Guide to Custom Commands

Guides Nov 23, 2020

Pengu features a highly customizable custom commands system, it can go from replacing a text from placeholder or be verbose enough to assign user roles and send messages in different channels.

Getting Started

To get started and add a custom command, you'll perform this command: p!addcmd <CommandName> <CommandContent>

  • Here p! is the prefix by which commands are triggered, you may use another one if your server has a custom one.
  • <CommandName> is the name of the trigger by which the command would be executed.
  • <CommandContent> is the content which will contain the tags and message you'd want to display.

Now let's get started! Everything beyond this point is concerned about what's inside <CommandContent>
<CommandContent> is just a placeholder for the 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, CommandContent is just the message which would be sent when a custom commands is executed.

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.

Advance Tags

  • {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.

This article is concerned about v3 of PenguBot. If you come across a bug, please report it on our Support Server.

To stay up to date with PenguBot, follow us on Twitter.

Thanks for using PenguBot, I hope you are having a great time!


Aditya Tripathi

Founder and Developer of PenguBot

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.