Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Possible Method Paramers

Bastian Oppermann edited this page Nov 16, 2017 · 5 revisions

Depending on your library there may be different possible parameters. Some of them work with all three libs and some others only work for one library.

Supported by all libraries

  • String: The first String parameter is the command itself (e.g. for !info author it would be "!info"). Any additional String will be populated with an argument (e.g. for !info author bla the 1st String would be "!info", the 2nd String "author", the 3rd String "bla" and any other String parameter null.
  • String[]: An array with all String parameters (e.g. for !info author bla it's ["author", "bla"].

Supported by Javacord

  • DiscordApi: The api instance.
  • Message: The message of the command.
  • User: The user who executed the command.
  • Channel: The channel of the command.
  • TextChannel: The text channel of the command.
  • ServerTextChannel: The server text channel of the command. If the command is executed in a private chat it's null.
  • GroupChannel: The group channel of the command. If the command is not executed in a group channel it's null.
  • PrivateChannel: The server text channel of the command. If the command is not executed in a private channel it's null.
  • ServerChannel: The server channel of the command. If the command is executed in a private chat it's null.
  • Server: The server of the command. If the command is executed in a private chat it's null.
  • MessageAuthor: The author of the message. The author is always a user.
  • Object[]: An array with all parameters as an object. It tries to convert parameters to an Integer, User or Channel. It's a String if it's non of these three.

Supported by JDA

  • JDA: The JDA instance.
  • Message: The message of the command.
  • MessageReceivedEvent: The event of the received message.
  • User: The user who executed the command.
  • Member: The member who executed the command. If the command is executed in a private chat it's null.
  • MessageChannel: The message channel of the command.
  • TextChannel: The text channel of the command. If the command is executed in a private chat it's null.
  • PrivateChannel: The private channel of the command. If the command is not executed in a private chat it's null.
  • Guild: The guild of the command. If the command is executed in a private chat it's null.
  • Group: The group channel of the command. If the command is not executed in a group channel it's null.
  • Object[]: An array with all parameters as an object. It tries to convert parameters to an Integer, User or TextChannel. It's a String if it's non of these three.

Supported by Discord4J

  • IDiscordClient: The client instance.
  • IMessage: The message of the command.
  • IUser: The user who executed the command.
  • IChannel: The text channel of the command. If the command is executed in a private chat it's null.
  • IGuild: The guild of the command. If the command is executed in a private chat it's null.
  • Object[]: An array with all parameters as an object. It tries to convert parameters to an Integer, IUser or IChannel. It's a String if it's non of these three.