Skip to content

Instantly share code, notes, and snippets.

@kyranet
Last active February 21, 2021 01:02
Show Gist options
  • Save kyranet/485287383d818ef70fe347e45f4f63a5 to your computer and use it in GitHub Desktop.
Save kyranet/485287383d818ef70fe347e45f4f63a5 to your computer and use it in GitHub Desktop.
Skyra's Custom Commands

Argument Types:

  • {author.id}: Author's ID.
  • {author.name}: Author's name.
  • {author}: Mention of the author.
  • {server.acronym} / {guild.acronym}: The server's acronym.
  • {server.id} / {guild.id}: The server's ID.
  • {server} / {guild} / {server.name} / {guild.name}: The server's name.
  • {random {v1} {v2} {v3...}}: Shows one random value.
  • {channel.id}: Requests a channel, shows its ID.
  • {channel.name}: Requests a channel, shows its name.
  • {channel}: Requests a channel, shows its mention.
  • {emoji}: Requests an emoji.
  • {user.displayName} / {member.displayName}: Requests a member, shows its display name (nickname, and if not set, username).
  • {user.id} / {member.id}: Requests a member, shows its ID.
  • {user.name} / {member.name}: Requests a member, shows its name.
  • {user} / {member}: Requests a member, shows its mention.
  • {pick =o1{v1} =o2{v2} =o3{v3...} ={default}}: Requests one of the options, falling back if invalid.
  • {rest}: Requests a value, consumes all the parameters.
  • {role.color}: Requests a role, shows its hexadecimal color.
  • {role.hoist}: Requests a role, shows whether or not it's hoisted.
  • {role.id}: Requests a role, shows its ID.
  • {role.name}: Requests a role, shows its name.
  • {role.position}: Requests a role, shows its position.
  • {role}: Requests a role, shows its mention.
  • {word}: Requests a single word.

Input Modifiers (syntax: {type | modifier1 | modifier2}):

  • mockcase: Alternates upper and lower cases.
  • lowercase: Turns the entire input lowercase.
  • uppercase: Turns the entire input uppercase.
  • length: Returns the length of the input.

Variable Names:

Additionally, variables can be named to re-use input, an example of it is:

  • {author} slapped {target:user}, but {target:user} got mad, slapping {author} back!

Note: identifiers cannot be used in different types, that is, you cannot have {target:user} and {target:user.id} in the same custom command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment