Skip to content
#

discord-bot

Here are 12,310 public repositories matching this topic...

RealHypnoticOcelot
RealHypnoticOcelot commented Oct 6, 2021

Why?

Having the bot give you a role based on a name of that role feels a lot less secure and more unreliable than giving you a role based on the role ID.

What and How?

In the config, it should request Role ID(i.e. 895290544421490758) instead of name(i.e. "Linked")

Are there alternatives?

I mean you could just keep what you currently have

Checks

  • I have used the search a
JohnScience
JohnScience commented Aug 10, 2018

The most of Discord bots are expected to provide "mute" and "ban" commands. Their implementation involves juggling with parsing strings just to get so-much-desired duration.

Formats:

"3w 1d 11 [many spaces]h \t30m 20s 5ms"

Methods:

  • duration.toWeeks() -> float
  • duration.toDays() -> float
  • duration.toMinutes() -> float
  • duration.toSeconds() -> float
  • duration.toMilliseconds()

Improve this page

Add a description, image, and links to the discord-bot topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the discord-bot topic, visit your repo's landing page and select "manage topics."

Learn more