thieleju / statsbot

Discord Bot to gather data from public APIs using node.js and discord.js! Hacktoberfest Event Project
MIT License
22 stars 45 forks source link

Add /server-ip command using myip.com #38

Closed johngerome closed 2 years ago

johngerome commented 2 years ago

Command Name

/myip /serverip

Public API Resource

https://www.myip.com/api-docs/

Description

Convenient command to check your IP. Command to check the servers public IP

Sample output could be

My Public IP Address: 111.222.123.123 My IP Location: Japan

Adding country flags would be nice I think.

Implementation Details

Code of Conduct

BiswajitSahoo-tech commented 2 years ago

I would like to implement this command, please assign this to me Thanks

CH1NRU5T commented 2 years ago

I would like to contribute to this command :)

thieleju commented 2 years ago

Hey @johngerome, thank you for opening this issue :) I updated the Contribution Guidelines to only allow one pr/issue per person. Since you're already assigned to #36 , I'm not going to assign this issue to you.

@BiswajitSahoo-tech @CH1NRU5T You two already contributed to this repository too, please look for other opportunities to contribute ❤️

thieleju commented 2 years ago

Since the server is making the request to the api, this might not work. More information needed

alldayalone commented 2 years ago

I can investigate. Feel free to assign me :)

thieleju commented 2 years ago

@AllDayAlone Sure, go ahead! :)

johngerome commented 2 years ago

Since the server is making the request to the api, this might not work. More information needed

Good catch. Need further investigation.

alldayalone commented 2 years ago

Hey @thieleju,

Indeed, the server IP is shown when you call myip.com in the bot. Moreover, it's not possible to get the user IP at all to comply with European laws. All requests go through Discord central servers where this information is hidden. An example thread that shows what I'm talking about: https://support.discord.com/hc/en-us/community/posts/360040211851-API-should-provide-a-user-s-IP-as-an-unique-and-encrypted-character-string-

The only way is to interact with the user via external websites, for example responding with a link Click to reveal, getting IP, and updating the response. But that's kinda scam.

I can contribute with the command /server-ip, what do you think? 😄

thieleju commented 2 years ago

@AllDayAlone Thank you for researching! I like your suggestion with the /server-ip command. I'm renaming the issue to /server-ip, feel free to raise a pr :)

thieleju commented 2 years ago

@AllDayAlone Well done! I approved your pr #111 and labeled it with the hacktoberfest-accepted label.

Keep contributing ❤️