Commands - Sven65/Sledgehammer GitHub Wiki

Sledgehammer Commands


Admin Commands

Kick

The kick command is used to kick members.

The usage is =>kick @user [@user] [@user]

Ban

The ban command is used to ban members.

The usage is =>ban @user [@user] [@user]

Clean

The clean command is used to remove messages.

The usage is =>clean [amount]

The amount parameter defaults to 10.

Blacklist

The blacklist command is used to blacklist words from being said.

The usage is =>blacklist <value>

The value parameter can be a word such as Hello, a phrase such as Hello World, or a JavaScript regex such as /Hello/

Whitelist

The whitelist command is used to remove items from the blacklist.

The usage is =>whitelist <value>

The value parameter should be an item on the current blacklist of the server.

Mute

The mute command is used to mute members.

The usage is =>mute @user [@user] [@user]

The command also requires some configuration to be done.

Reason

Work In Progress.


Config

Modlog

The modlog command is used to change the channel where Sledgehammer sends messages such as kicks and bans.

The usage is =>modlog #channel

Linkfilter

The linkfilter command is used to change what types of links should be filtered in a channel.

The usage is =>linkfilter [#channel] <all/invites/none>

If the Channel parameter is not present, the command defaults to the channel the command was sent in.

If the value is all, the bot will remove all links.

If the value is invites, the bot will only filter invite links such as discord.gg

If the value is none, the bot will not filter any links.

Config

The config command is used to see the current configuration of the server.

Setprefix

The setprefix command is used to change the prefix of Sledgehammer.

The usage is =>setprefix <prefix>

The prefix value can be a maximum of 16 characters.

Edit

The edit command is used to edit Sledgehammers actions when certain events occur.

The usage is =>edit <event> <responseType> <value>

Events

(If the event has a ❌ next to it, it's not been added yet.)

  • onJoin
    • The onJoin event is emited when a user joins the server.
      • Emits the tag ${user}
  • onLeave
    • The onLeave event is emited when a user leaves the server.
      • Emits the tag ${user}
  • onKick
    • The onKick event is emited when a user is kicked from the server by the kick command.
      • Emits the tags ${kicker}, ${kickCount} and ${kicks}
  • onBan
    • The onBan event is emited when a user is banned from the server by the ban command.
      • Emits the tags ${banner}, ${banCount} and ${bans}
  • onUnban
    • The onUnban event is emited when a user is unbanned from the server.
  • onMute
    • The onMute event is emited when a user is muted on a server.
      • Emits the tags ${muter}, ${muteCount} and ${mutes}
  • onUnmute
    • The onUnmute event is emited when a user is unmuted on the server.
      • Emits the tags ${muter}, ${muteCount} and ${unmutes}
  • onLinkRemove
    • The onLinkRemove event is emited when Sledgehammer removes a link.
      • Tag emits
        • ${type}
        • ${From}
        • ${FromName}
        • ${FromID}
        • ${FromDiscrim}
        • ${Channel}
        • ${ChannelName}
        • ${ChannelID}
  • onEmojiCreate
    • The onEmojiCreate event is emited when an emoji is created on the server.
      • Tag emits
        • ${emoji}
        • ${emojiname}
        • ${emojiid}
        • ${emojicreated}
        • ${emojiurl}
  • onEmojiDelete ❌
    • The onEmojiDelete event is emited when an emoji is deleted on the server.
      • Tag emits
        • ${emoji}
        • ${emojiname}
        • ${emojiid}
        • ${emojicreated}
        • ${emojiurl}
  • onEmojiUpdate ❌
    • The onEmojiUpdate event is emited when an emoji is updated on the server.
      • Tag emits
        • ${oldemoji}
        • ${oldemojiname}
        • ${oldemojiid}
        • ${oldemojicreated}
        • ${oldemojiurl}
        • ${newemoji}
        • ${newemojiname}
        • ${newemojiid}
        • ${newemojicreated}
        • ${newemojiurl}
  • onMemberUpdate ❌
    • The onMemberUpdate event is emited when a member of the server changes - i.e. new role, removed role, nickname.
  • onUserUpdate ❌
    • The onUserUpdate event is emited when the details (e.g. username) of a user is changed.
  • onServerUpdate ❌
    • The onServerUpdate event is emited when the server is updated - e.g. name change.
  • onMessageDelete ❌
    • The onMessageDelete event is emited when a message is deleted.
  • onMessageUpdate ❌
    • The onMessageUpdate event is emited when a message is updated.
  • onRoleCreate ❌
    • The onRoleCreate event is emited when a role is created.
  • onRoleDelete ❌
    • The onRoleDelete event is emited when a role is removed.
  • onRoleUpdate ❌
    • The onRoleUpdate event is emited when a role is updated.
  • onChannelCreate ❌
    • The onChannelCreate event is emited when a channel is created.
  • onChannelDelete ❌
    • The onChannelDelete event is emited when a channel is delted.
  • onChannelUpdate ❌
    • The onChannelUpdate event is emited when a channel is updated.
  • onPinsUpdate ❌
    • The onPinsUpdate event is emited when the pins of a channel is updated.
Response Types
  • Message

    • Sets the message to send when the event is emited
  • Embed

    • Utilises the 'Discord RichEmbed' feature. soonβ„’
Values

If the response type is set to message, the value should be formatted as [#channel] message

If no channel is present, the message will default to the modlog channel if set, otherwise it'll default to the channel the command was sent in.

The message parameter can be edited using certain tags to get information about the event.

Tags
  • Date tags
  %%   a literal %
  %a   locale's abbreviated weekday name (e.g., Sun)
  %A   locale's full weekday name (e.g., Sunday)
  %b   locale's abbreviated month name (e.g., Jan)
  %B   locale's full month name (e.g., January)
  %d   day of month (e.g., 01)
  %D   date; same as %m/%d/%y
  %H   hour (00..23)
  %m   month (01..12)
  %M   minute (00..59)
  %S   second (00..60)
  %T   time; same as %H:%M:%S
  %y   last two digits of year (00..99)
  %Y   year

Message

The message command is used to configure what messages should be sent.

The usage is =>message <type> <true/false>

Types

(If the Type has a ❌ next to it, it's not been added yet.)

  • Join
  • Leave
  • Ban
  • Unban
  • Linkdelete
  • Blacklistdelete
  • Mute
  • Unmute
  • EmojiCreate
  • EmojiUpdate
  • EmojiDelete
  • MemberUpdate ❌
  • UserUpdate ❌
  • ServerUpdate ❌
  • MessageUpdate ❌
  • RoleCreate ❌
  • RoleDelete ❌
  • RoleUpdate ❌
  • ChannelCreate ❌
  • ChannelDelete ❌
  • ChannelUpdate ❌
  • PinUpdate ❌

Role

The role command is used to change roles of commands.

The usage is =>role <RoleType> @role/Role Name

Role types
  • Muted
    • The role to give users when using the =>mute command

General Commands

Ping

The ping command shows the response time of Sledgehammer.

The usage is =>ping

Help

The help command shows the commands and information about the commands of Sledgehammer

The usage is =>help [command]

Invite

The invite command shows a link to invite Sledgehammer.

The usage is =>invite

⚠️ **GitHub.com Fallback** ⚠️