SAMMI Stuff

Find all the information you need to set up Deck Hopper and my extensions for your SAMMI.

Random Bunny

SAMMI Extensions

Discord Controls

Get on Ko-fi
Slide 1

Discord Controls is an extension that gives you and your viewers a super easy way to run your Discord server right from SAMMI.

Features

  • See Everything - Access a list of all channels, members, and emojis in your server.
  • Find Anyone - Easily search for members and see their information.
  • Manage Messages - View, make, change, or delete messages in your channel.
  • Create Messages with Attachments and Embeds - Send messages with images, files, and embeds.
  • Handle Reactions - Get, create, and remove reactions to messages.
  • Send Direct Messages - Shoot private messages to members of your server.
  • Take Care of Roles - View, add, or remove member roles - it's never been easier!
  • Change Nicknames - Quickly change any member's nickname.
  • Control Members - Mute, deafen, move, or time-out members to keep your server friendly and fun.
  • Update Server - Change your server details, including its name and icon. You can even show when you're live with a simple 'live' overlay on your server icon!
  • Rename Channels - Change any channel name whenever you want.
  • Create invite - Create a new channel invite with options like maximum age and maximum usage.

With Discord Controls, running your Discord server is a breeze!


Setup

  1. Install the extension. You can follow the Extension Install Guide.

  2. Edit the INIT SETTINGS button in the Discord Controls premade deck. Here's what you'll need to do:

    • Discord Bot Token:

      1. Create a new application at Discord Developers.

      2. Go to the 'Bot' menu and click 'Add Bot' (if you get an error, try renaming the application).

      3. Enable the 'SERVER MEMBERS INTENT' and 'MESSAGE CONTENT INTENT' options (these are important for using the Get Members and Get Messages commands).

      4. In the 'Bot' menu, hit 'Reset Token' and copy this into the Discord Bot Token box in SAMMI.

      5. In the 'OAuth2 - URL Generator' menu, check the 'Bot' scope. You'll need to give the bot specific permissions for certain SAMMI commands.
        Here’s a list of required permissions:

        CommandPermission Required
        Get MessagesRead Message History
        Create MessageSend Messages
        Delete MessageManage Messages
        Send DMSend Messages
        Create ReactionRead Message History, Add Reactions
        Add RoleManage Roles
        Remove RoleManage Roles
        Change NicknameManage Nicknames
        MuteMute Members
        DeafenDeafen Members
        MoveMove Members
        TimeoutModerate Members
        Create EventCreate Events
        Delete EventManage Events
        Modify ChannelManage Channels
        Modify ServerManage Server
      6. Copy the generated URL, paste it into your browser, and invite the bot to your Discord server.

      7. If you want to manage roles, make sure the bot’s role is higher than the roles you wish to modify in Discord Server Settings.

    • Default Discord Server ID: This is the ID of the Discord server you want to control. Here’s how to get it:

      1. In Discord, turn on Developer Mode (found in User Settings > Advanced).
      2. Right-click your Server name and click 'Copy ID'.
    • Amount of members to retrieve: Select how many members you want to display in the User ID dropdowns in DisCon commands. This makes it easier to choose members without searching for their ID manually.

  3. Save the changes to the INIT Settings button, then save the whole deck. Reload your Bridge to activate the extension.

Once the extension is running, all DisCon commands will show dropdowns for channel, role, emoji, and member IDs. For using a different server in commands than the default one, you’ll need to input these manually.


Available Commands

Command Usage Reminder

These commands require a waiting period before 'Save Variable As' is populated. Use the Wait Until Variable Exists command, and remember to delete the variable you're waiting for beforehand.

Get Channels

Retrieves an array containing all channels in the server. Each channel is an object.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Save VariableVariable name to save the result into.

Example payload for a single channel object:

{
    "position": 1.0,
    "guild_id": "123477614154252318",
    "permission_overwrites": [
        {
            "allow": 0.0,
            "allow_new": "0",
            "deny_new": "1024",
            "id": "123477614154252318",
            "deny": 1024.0,
            "type": "role"
        },
        {
            "allow": 0.0,
            "allow_new": "0",
            "deny_new": "1024",
            "id": "123478636284641351",
            "deny": 1024.0,
            "type": "role"
        }
    ],
    "last_message_id": "1234199175164215347",
    "flags": 0.0,
    "nsfw": 0.0,
    "parent_id": "807277614154252319",
    "rate_limit_per_user": 0.0,
    "id": "936175293419368488",
    "type": 0.0,
    "topic": null,
    "name": "My Test Channel"
}

Get Members

Retrieves an array of current server members. Each member is an object.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Maximum AmountMaximum number of members to retrieve.
Save VariableVariable name to save the result into.

Example payload for a single member object:

{
    "premium_since": null,
    "roles": [
        "999829629307199528",
        "807278636284641351"
    ],
    "flags": 0.0,
    "pending": 0.0,
    "joined_at": "2021-02-05T15:53:01.711000+00:00",
    "communication_disabled_until": null,
    "is_pending": 0.0,
    "mute": 0.0,
    "user": {
        "avatar_decoration": null,
        "public_flags": 0.0,
        "discriminator": "9031",
        "username": "Christinna",
        "id": "452058585715834890",
        "avatar": "76465f81d94b50023f2d51b63e6e57bd"
    },
    "nick": null,
    "avatar": null,
    "deaf": 0.0
}

Get Roles

Retrieves an array of all current server roles. Each role is an object.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Save VariableVariable name to save the result into.

Example payload for a single role object:

{
    "position": 0.0,
    "color": 0.0,
    "managed": 0.0,
    "icon": null,
    "flags": 0.0,
    "unicode_emoji": null,
    "hoist": 0.0,
    "mentionable": 0.0,
    "permissions": 104320577.0,
    "id": "807277614154252318",
    "description": null,
    "permissions_new": "1071698660929",
    "name": "@everyone"
}

Get Emojis

Retrieves an array of current server emojis. Each emoji is an object.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Save VariableVariable name to save the result into.

Example payload for a single emoji object:

{
    "managed": 0.0,
    "animated": 0.0,
    "roles": [],
    "url": "https:\/\/cdn.discordapp.com\/emojis\/1000155778554024066.png",
    "available": 1.0,
    "id": "1000155778554024066",
    "require_colons": 1.0,
    "name": "myEmoji"
}

Get User

Retrieves a single user object.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
User IDUser ID of the user to retrieve. You can select it from the dropdown or input it manually.
Save VariableVariable name to save the result into.

Example payload for a single user object:

{
    "banner_color": null,
    "banner": null,
    "banner_url": 0.0,
    "avatar_decoration": null,
    "accent_color": null,
    "public_flags": 0.0,
    "discriminator": "9031",
    "username": "Christinna",
    "avatar_url": "https:\/\/cdn.discordapp.com\/avatars\/452058585715834890\/76465f81d94b50023f2d51b63e6e57bd.png",
    "id": "452058585715834890",
    "avatar": "76465f81d94b50023f2d51b63e6e57bd"
}

Get Messages

Retrieves an array of channel messages. Each message is an object. Your Discord Bot must have READ_MESSAGE_HISTORY permission.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Channel IDChannel ID to retrieve the messages from. You can select it from the dropdown or input it manually.
Maximum AmountMaximum number of messages to retrieve (default is 50 if left empty).
Save VariableVariable name to save the result into.

Example payload for a single message object:

{
    "components": [],
    "tts": 0.0,
    "pinned": 0.0,
    "attachments": [],
    "embeds": [],
    "mention_roles": [],
    "author": {
        "avatar_decoration": null,
        "public_flags": 0.0,
        "discriminator": "9031",
        "username": "Christinna",
        "id": "452058585715834890",
        "avatar": "76465f81d94b50023f2d51b63e6e57bd"
    },
    "edited_timestamp": null,
    "flags": 0.0,
    "channel_id": "807277614154252321",
    "content": "Hello world!",
    "mentions": [],
    "id": "1040363939843801128",
    "timestamp": "2022-11-10T20:34:52.286000+00:00",
    "type": 0.0,
    "mention_everyone": 0.0
}

Create Message

Creates a new message and returns a message object. Your Discord Bot must have SEND_MESSAGES permission.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Channel IDChannel ID to create the message in. You can select it from the dropdown or input it manually.
ContentMessage Text
Embed Json (optional)Message Embed JSON (can be built using the Embed Builder).
Attachment File (optional)Full path to the file you wish to attach, select or insert.
Save VariableVariable name to save the result into.

Embed or Attachment

You can fill out either an embed or a file attachment, not both.

Example payload for a single message object:

{
    "components": [],
    "tts": 0.0,
    "pinned": 0.0,
    "attachments": [],
    "embeds": [],
    "mention_roles": [],
    "author": {
        "avatar_decoration": null,
        "public_flags": 0.0,
        "discriminator": "2706",
        "username": "LBTwitch",
        "id": "815902341671813150",
        "avatar": null,
        "bot": 1.0
    },
    "edited_timestamp": null,
    "flags": 0.0,
    "channel_id": "807277614154252321",
    "content": "Hello world!",
    "referenced_message": null,
    "mentions": [],
    "id": "1040364294417686638",
    "timestamp": "2022-11-10T20:36:16.823000+00:00",
    "type": 0.0,
    "mention_everyone": 0.0
}

Edit Message

Edits a previously sent message. Must have been sent by the same Discord bot. Returns a message object.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Channel IDChannel ID to edit the message in. You can select it from the dropdown or input it manually.
Message IDMessage ID to edit. Can be retrieved when you use Create Message command.
ContentNew Message Text
Embed Object (optional)New Message Embed, you can build it at Discord Embed Builder.
Save VariableVariable name to save the result into.

Example payload for a single message object:

{
    "components": [],
    "tts": 0.0,
    "pinned": 0.0,
    "attachments": [],
    "embeds": [],
    "mention_roles": [],
    "author": {
        "avatar_decoration": null,
        "public_flags": 0.0,
        "discriminator": "2706",
        "username": "LBTwitch",
        "id": "815902341671813150",
        "avatar": null,
        "bot": 1.0
    },
    "edited_timestamp": null,
    "flags": 0.0,
    "channel_id": "807277614154252321",
    "content": "Hello world!",
    "referenced_message": null,
    "mentions": [],
    "id": "1040364294417686638",
    "timestamp": "2022-11-10T20:36:16.823000+00:00",
    "type": 0.0,
    "mention_everyone": 0.0
}

Delete Message

Deletes a single message. Your Discord Bot must have MANAGE_MESSAGES permission.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Channel IDChannel ID to delete the message in. You can select it from the dropdown or input it manually.
Message IDMessage ID to delete. Can be retrieved with Get Messages or Create Message command.
Save VariableVariable name to save the result into.

Send DM

Sends a new DM message. Your Discord Bot must have SEND_MESSAGES permission.

There are two steps required to send a DM:

  1. Use DisCon Create DM command and retrieve the DM channel ID from the Save Variable response object.
  2. Use DisCon Create Message command using the DM channel ID you retrieved from step 1.
Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
User IDUser ID to start the DM with. Can be retrieved via Get Members, Search Member command or selected from dropdown.
Save VariableVariable name to save the result into.

Get Reactions

Retrieves an array of users who reacted to the specified message with the specified emoji. Each user is an object.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Channel IDChannel ID where the message resides. You can select it from the dropdown or input it manually.
Message IDMessage ID to find the reactions (can be retrieved with Get Messages or Create Message command).
EmojiEmoji reaction to look for
  • For a custom emoji you can select it from the dropdown.
  • For a regular Discord emoji, copy and paste the emoji (e.g., 👍 for thumbs up).

Example payload for a single user object:

{
    "avatar_decoration": null,
    "public_flags": 0.0,
    "discriminator": "9031",
    "username": "Christinna",
    "id": "452058585715834890",
    "avatar": "76465f81d94b50023f2d51b63e6e57bd"
}

Create Reaction

Creates a reaction to the specified message with the specified emoji. Your Discord Bot must have READ_MESSAGE_HISTORY, ADD_REACTIONS permissions.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Channel IDChannel ID where the message resides. You can select it from the dropdown or input it manually.
Message IDMessage ID to react to (can be retrieved with Get Messages or Create Message command).
EmojiEmoji to react with.

- For a custom emoji you can select it from the dropdown.
- For a regular Discord emoji, copy and paste the emoji (e.g., 👍 for thumbs up).


Delete Reaction

Deletes your Discord bot’s reaction to the specified message with the specified emoji.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Channel IDChannel ID where the message resides. You can select it from the dropdown or input it manually.
Message IDMessage ID to delete the reaction from (can be retrieved with Get Messages or Create Message command).
EmojiEmoji reaction to delete.

- For a custom emoji you can select it from the dropdown.
- For a regular Discord emoji, copy and paste the emoji (e.g., 👍 for thumbs up).


Add Role

Adds a specific role to the specified user. Your Discord Bot must have MANAGE_ROLES permissions and its own role must be ABOVE the role you're adding in Server Settings.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
User IDUser ID of the user to add the role to. You can select it from the dropdown or input it manually.
Role IDRole ID to add to the user. You can select it from the dropdown or input it manually.

Remove Role

Removes a specific role from the specified user. Your Discord Bot must have MANAGE_ROLES permissions and its own role must be ABOVE the role you're removing in Server Settings.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
User IDUser ID of the user to remove the role from. You can select it from the dropdown or input it manually.
Role IDRole ID to remove from the user. You can select it from the dropdown or input it manually.

Change Nickname

Changes a user's nickname in the server. Your Discord Bot must have MANAGE_NICKNAMES permission.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
User IDUser ID of the user to change the nickname for. You can select it from the dropdown or input it manually.
New NicknameMember's new nickname.

Mute

Mutes a user in a voice channel. Your Discord Bot must have MUTE_MEMBERS permission.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
User IDUser ID of the user to mute. You can select it from the dropdown or input it manually.
MuteCheck to mute or uncheck to unmute the user.

Deafen

Deafens a user in a voice channel. Your Discord Bot must have DEAFEN_MEMBERS permission.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
User IDUser ID of the user to deafen. You can select it from the dropdown or input it manually.
DeafenCheck to deafen or uncheck to undeafen the user.

Move Channel

Moves a user in a voice channel to a different voice channel. Your Discord Bot must have MOVE_MEMBERS permission.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
User IDUser ID of the user to move. You can select it from the dropdown or input it manually.
Channel IDNew channel ID to move the user to (must be a voice channel).

Timeout

Times out a user in a server and prevents them from sending messages for a set period of time. Your Discord Bot must have MODERATE_MEMBERS permission.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
User IDUser ID of the user to time out. You can select it from the dropdown or input it manually.
Timeout ForDuration of the timeout.
Timeout TypeUnits of time (seconds, minutes, hours, days).

To remove a timeout, set Timeout For to 0 and run the command again.


Search Member

Searches for a specific member in your server by their nickname. Returns an array of all users matching the search query.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Search QueryMember's nickname to search for (or their username if no nickname is set).
Save VariableVariable name to save the result into.

Example payload for a single user object after searching for 'Chris':

{
    "premium_since": null,
    "roles": [
        "999829629307199528",
        "807278636284641351"
    ],
    "flags": 0.0,
    "pending": 0.0,
    "joined_at": "2021-02-05T15:53:01.711000+00:00",
    "communication_disabled_until": null,
    "mute": 0.0,
    "user": {
        "public_flags": 0.0,
        "discriminator": "9031",
        "username": "Christinna",
        "id": "452058585715834890",
        "avatar": "76465f81d94b50023f2d51b63e6e57bd",
        "bot": 0.0
    },
    "nick": null,
    "avatar": null,
    "deaf": 0.0
}

Get Events

Retrieves an array of all scheduled server events. Each event is an object.

Box NameExplanation
Discord Server IDDiscord server ID. Leave empty or at 0 to use the default.
Save VariableVariable name to save the result into.

Example payload for a single event object:

{
    "guild_id": "807277614154252318",
    "scheduled_end_time": "2023-05-17T07:00:00.133000+00:00",
    "channel_id": null,
    "creator_id": "452058585715834890",
    "sku_ids": [],
    "privacy_level": 2.0,
    "creator": {
        "avatar_decoration": null,
        "public_flags": 0.0,
        "discriminator": "9031",
        "username": "Christinna",
        "global_name": null,
        "id": "452058585715834890",
        "avatar": "76465f81d94b50023f2d51b63e6e57bd"
    },
    "image": null,
    "entity_id": null,
    "entity_metadata": {
        "location": "Earth"
    },
    "id": "1108246104262316114",
    "scheduled_start_time": "2023-05-17T05:00:00.133000+00:00",
    "description": "Hello description",
    "status": 1.0,
    "name": "Test event",
    "entity_type": 3.0
}

Create Event

Creates a new event. Your Discord Bot must have CREATE_EVENTS permission.

Box NameExplanation
Server IDDiscord server ID. Leave empty or at 0 to use the default.
TypeEvent Type to create (e.g., voice, external).
NameName of the event.
Channel IDIf the event type is voice, select the Channel ID.
LocationIf the event type is external, specify the location.
DescriptionDescription of the event.
Start TimeStart time of the event (ISO8601 format).
End TimeEnd time of the event (ISO8601 format).
Save VariableVariable name to save the response (optional). Contains the event object created.

Delete Event

Deletes an existing scheduled event. Your Discord Bot must have MANAGE_EVENTS permission.

Box NameExplanation
Server IDDiscord server ID. Leave empty or at 0 to use the default.
Event IDEvent ID to delete. Returned in Get Events or Create Event command.
Save VariableVariable name to save the response (optional). Will be set to 'ok' if the event was successfully deleted.

Modify Channel

Modifies a specified channel. Leave boxes empty to leave unchanged. Your Discord Bot must have MANAGE_CHANNELS permission.

Box NameExplanation
Server IDDiscord server ID. Leave empty or at 0 to use the default.
Channel IDChannel ID to modify. You can select it from the dropdown or input it manually.
NameNew name for the channel.
TopicNew topic for the channel.
NSFWCheck if the channel should be marked as NSFW.
Save VariableVariable name to save the response (optional). Contains the updated channel object.

Modify Server

Modifies a server. Leave boxes empty to keep current values unchanged. Your Discord Bot must have MANAGE_GUILD permission.

Box NameExplanation
Server IDDiscord server ID. Leave empty or at 0 to use the default.
NameNew name for the server.
DescriptionNew description for the server.
IconNew icon for the server (1024x1024 recommended, PNG/JPEG/GIF).
Save VariableVariable name to save the response (optional). Contains the updated server object.

Encode Emojis

Encodes Unicode Discord emoji to be used in other Discord commands, such as 'Get Reactions' command.
Find full example inside the 'Get Reactions' command.

Box NameExplanation
EmojiUnicode emoji to encode.
Save VariableVariable name to save the encoded emoji into.

Format Emojis

Formats input containing Discord Unicode emojis to be used outside of Discord (e.g., Twitch chat), instead of displaying the raw Unicode.
Find full example inside the 'Get Messages' command.

Box NameExplanation
MessageInput containing Discord Unicode emojis.
Save VariableVariable name to save the formatted input into.

Get Help

Please see Troubleshooting for common extensions issues.

Previous
Deck Hopper Advanced