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

Guide to Custom Commands

Aditya N. Tripathi edited this page Oct 18, 2018 · 9 revisions

Hey everyone, in this guide I'll teach and explain to you all on how to PenguBot's Custom Commands in an Advanced Way!

Just to clear things up, to make a Custom Command you do p!addcmd <CommandName> <CommandContent>

  • Here p! is the prefix by which commands are triggered.
  • <CommandName> is the name of the trigger by which the command would be triggered.
  • <CommandContent> would be the content which will contain all the tags and message you'd display.

Now let's get started! Everything I tell here can be included inside <CommandContent> <CommandContent> is just a placeholder for a message. It does not need to be written as is, it's empty and the <> suggest that they are required in order to use the command also CommandContent is just the message which would be returned when a Custom Commands will be executed.

Examples Of Use Of Tags: https://discord.gg/knhmzJ7

Now let's see an example of a very basic Custom Command:

  • p!addcmd testing Hey this is a test Which would return Hey this is a test when someone does p!testing on a server.

Now let's understand what all we can integrate inside the content which makes this advance!

  • {allargs} - Get Everything that a person has written after a Custom Command in a String format.
  • {args} or {arguments} - Whatever the person has written after the custom command in an Array format. (i.e. {arg1}, {arg2} for the placement of the argument given by the executor)
  • {choices}, {choose} or {choice} - To choose from different options provided by users. (i.e. {choices:{args1}|{args2}})
  • {argslen} - Return the number of arguments supplied by the executor.
  • {roleadd:RoleName/ID} or {addrole:RoleName/ID} - Give the person executing the command a role if bot has permissions.
  • {roleremove:RoleName/ID} or {removerole:RoleName/ID} - Takes away an existing role from the command executor.
  • {username} or {authorname} - Will return the username of the person executing the command.
  • {usertag} or {authortag} - This will return the Tag of a person (i.e. AdityaTD#5346)
  • {userid} or {authorid} - Get the Author ID of the User (i.e. 136549806079344640)
  • {dmuser} or {userdm} - Direct Message whoever executes the custom command.
  • {usermention}, {user} or {author} - Tag the person who executes the custom command.
  • {server}, {servername}, {guild} or {guildname} - To get Guild/Server's Name
  • {serverid} or {guildid}` - Gives you the Guild/Server's ID
  • {servercount}, {membercount} or {guildcount} - Get how many members there are in your guild/server.

More Updating SOON! Stay Updated!!

Clone this wiki locally