Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a Discord bot for usability #397

Open
6ixfalls opened this issue Jul 20, 2023 · 1 comment
Open

Implement a Discord bot for usability #397

6ixfalls opened this issue Jul 20, 2023 · 1 comment

Comments

@6ixfalls
Copy link

Hi! Read jimaek's post on LET, and wanted to provide my take on a globalping Discord bot.

Discord bots primarily revolve around slash commands, in which there should be one slash command for each task (/ping, /traceroute, /mtr, etc.) Alternatively, you could also have one single /globalping command, which has an argument for which command to run (similar to the Slack and GitHub integrations, although personally I'd prefer having a command for each type rather than one command with options.) These commands would also have arguments like the Slack commands, in which the target can be made required while the "from" and "limit" arguments can be optional (and default to Global and a set default limit). In addition, the from argument can also be autocompleted, giving users an easier way to select the correct source.

For responses, rich embeds are definitely the way to go. Cloudflare has a DNS over Discord bot, which uses rich embeds to display results. The initial run of the command should result in a deferReply call, in which Discord will show the message " is thinking...", which would likely be a good indicator that the task is in progress. For sending results, a rich embed with a field for every source would be nice.

In addition, there could also be a button at the bottom of the embed for viewing the full results. The above embed was based on this test post #393 (comment), which contains a message and link at the end to view the full results. You can use a button with the Link style for that, even though the link is already in the title of the embed, not everyone will know to click it.
The source of the above embed is here.

In theory, there are many different ways to integrate globalping as a Discord bot. Cloudflare integrates their DNS service as a Discord bot by using one big codeblock for all information, which globalping could use as well.

Finally, for "promoting", there isn't much you'd need to do. For one, you can add it alongside the Slack integration in the Globalping website, and if you'd like, add it to a few discord bot lists (https://top.gg/), for example. In addition, you'd also likely want to verify the bot to invite it to move than 100 servers, which would require you to provide your ID to Discord through Stripe verification and a monthlong process.

Thanks for reading, feel free to comment and modify the theming and layout at will!

@jimaek
Copy link
Member

jimaek commented Jul 21, 2023

Thank you for this detailed issue! We will make sure to get your feedback during the development process :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants