Extensions

Extend SAMMI's functionality with our community made extensions.

Discord Controls

Developed by:
Rating | Social | views

Overview

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

Key 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.
  • 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!


Special thanks goes to:
My amazing Patrons.
Thank you so much!

If you would like to support me developing SAMMI itself and my extensions, you can join my Patreon, which will give you access to all my upcoming creations for completely free and priority help on any of my extensions.

DISCLAIMER: The extension is provided as is. The developer has no obligation to provide maintenance and support services or handle any bug reports.
Feel free to edit the extension for your own use. You may not distribute, sell or publish it without the author’s permission.


Additional Information
Version 1.3 Requires SAMMI 2024.1.1.2 and up^ Stream Platform Any Updated March 23, 2024
Setup
  1. First, check that you’re using the most recent version of SAMMI and install the extension. If you’re not sure how to do this, there’s a handy Extension Install Guide that can help.

  2. Next, you’re going to 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 over at https://discord.com/developers/applications
      2. Click on the ‘Bot’ menu and hit ‘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. Still 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 some specific permissions so it can do certain things from SAMMI.
        Here’s a list of what permissions are needed for each command:

        Command Permission Required
        Get Messages Read Message History
        Create Message Send Messages
        Delete Message Manage Messages
        Send DM Send Messages
        Create Reaction Read Message History, Add Reactions
        Add Role Manage Roles
        Remove Role Manage Roles
        Change Nickname Manage Nicknames
        Mute Mute Members
        Deafen Deafen Members
        Move Move Members
        Timeout Moderate Members
        Create Event Create Events
        Delete Event Manage Events
        Modify Channel Manage Channels
        Modify Server Manage Server
      1. Hit ‘Copy’ to get the URL, paste this into your browser and invite the bot to your Discord server
      2. If you want to give or take away roles from members, you need to make sure your bot’s role is higher than these roles in your Discord Server Settings
    • Default Discord Server ID - This is the ID of the Discord server that you want to control with the extension. Here’s how to get it:
      1. In Discord, turn on Developer Mode. You can find this in User Settings (click the cog in the bottom left corner) in the Advanced tab
      2. Right-click your Server name and click ‘Copy ID’
    • Amount of members to retrieve - Choose how many members you want to pull up in the User ID dropdowns in DisCon commands. This just makes it a bit easier to pick a member without having to find their ID.
  3. Save the changes you made to the INIT Settings button. Then save the whole deck. Reload your Bridge to get the extension going.

Once it’s up and running, all DisCon commands will show dropdowns for channel, role, emoji and member IDs. If you want to use a different server in your commands than your default one, you will need to manually input these.

Available Commands

  1. Get Channels
  2. Get Members
  3. Get Roles
  4. Get Emojis
  5. Get User
  6. Get Messages
  7. Create Message
  8. Edit Message
  9. Delete Message
  10. Send DM
  11. Get Reactions
  12. Create Reaction
  13. Delete Reaction
  14. Add Role
  15. Remove Role
  16. Change Nickname
  17. Mute
  18. Deafen
  19. Move Channel
  20. Timeout
  21. Search Member
  22. Get Events
  23. Create Event
  24. Delete Event
  25. Modify Channel
  26. Modify Server

Get Channels [Back to Top]
Retrieves an array containing all channels in the server. Each channel is an object.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Save Variable Variable 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 [Back to Top]
Retrieves an array of current server members. Each member is an object.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Maximum Amount Maximum amount of members to retrieve
Save Variable Variable 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 [Back to Top]
Retrieves an array of all current server roles. Each role is an object.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Save Variable Variable 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 [Back to Top]
Retrieves an array of current server emojis. Each emoji is an object.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Save Variable Variable 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 [Back to Top]
Retrieves a single user object.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
User ID User ID of the user to retrieve. You can select it from the dropdown or input it manually.
Save Variable Variable name to save the result into

Example payload for the 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 [Back to Top]
Retrieves an array of channel messages. Each message is an object.
Your Discord Bot must have READ_MESSAGE_HISTORY permission.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Channel ID Channel ID to retrieve the messages from. You can select it from the dropdown or input it manually.
Maximum Amount Maximum amount of messages to retrieve (default is 50 if left empty)
Save Variable Variable 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 [Back to Top]
Creates a new message and returns a message object. Your Discord Bot must have SEND_MESSAGES permission.
If you want to tag a specific user or a role, please refer to this Message Formatting Documentation.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Channel ID Channel ID to create the message in. You can select it from the dropdown or input it manually.
Content Message Text
Embed Object (optional) Message Embed JSON, you can build it at https://glitchii.github.io/embedbuilder/
Save Variable Variable 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
}

Edit Mesage [Back to Top]
Edits a previously sent message. Must have been sent by the same Discord bot. Returns a message object.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Channel ID Channel ID to edit the message in. You can select it from the dropdown or input it manually.
Message ID Message ID to edit. Can be retrieved when you use Create Message command.
Content New Message Text
Embed Object (optional) New Message Embed, you can build it at https://autocode.com/tools/discord/embed-builder/
Save Variable Variable 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 [Back to Top]
Deletes a single message.
Your Discord Bot must have MANAGE_MESSAGES permission.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Channel ID Channel ID to delete the message in. You can select it from the dropdown or input it manually.
Save Variable Variable name to save the result into

Send DM [Back to Top]
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 Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
User ID User ID to start the DM with. Can be retrieved via Get Members, Search Member command or selected from dropdown.
Save Variable Variable name to save the result into

Get Reactions [Back to Top]
Retrieves an array of users who reacted to the specified message with the specified emoji. Each user is an object.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Save Variable Variable name to save the result into
Channel ID Channel ID where the message resides. You can select it from the dropdown or input it manually.
Message ID Message ID to find the reactions (can be retrieved with Get Messages or Create Message command)
Emoji Emoji reaction to look for
- For a custom emoji you can select it from the dropdown
- For a regular Discord emoji, just copy paste the emoji (not the code, the emoji itself)
- for example a Thumbs Up emojis would be: 👍
- for example a Blue Heart emoji would be: 💙
- SAMMI will display emojis as small rectangle symbols, however it will correctly send them to Discord

Example payload for a single user object:

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

Create Reaction [Back to Top]
Creates a reaction to the specified message with the specified emoji.
Your Discord Bot must have READ_MESSAGE_HISTORY, ADD_REACTIONS permissions.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Channel ID Channel ID where the message resides. You can select it from the dropdown or input it manually.
Message ID Message ID to react to (can be retrieved with Get Messages or Create Message command)
Emoji Emoji to react with
- For a custom emoji you can select it from the dropdown
- For a regular Discord emoji, just copy paste the emoji (not the code, the emoji itself)
- for example a Thumbs Up emojis would be: 👍
- for example a Blue Heart emoji would be: 💙
- SAMMI will display emojis as small rectangle symbols, however it will correctly send them to Discord

Delete Reaction [Back to Top]
Deletes your own Discord bot’s reaction to the specified message with the specified emoji.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Channel ID Channel ID where the message resides. You can select it from the dropdown or input it manually.
Message ID Message ID to delete the reaction of (can be retrieved with Get Messages or Create Message command)
Emoji Emoji reaction to delete
- For a custom emoji you can select it from the dropdown
- For a regular Discord emoji, just copy paste the emoji (not the code, the emoji itself)
- for example a Thumbs Up emojis would be: 👍
- for example a Blue Heart emoji would be: 💙
- SAMMI will display emojis as small rectangle symbols, however it will correctly send them to Discord

Add Role [Back to Top]
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 Name Explanation
Discord Server ID Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
User ID User ID of the user to remove the role from. You can select it from the dropdown or input it manually.
Role ID Role ID to remove from 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 Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Save Variable Variable name to save the result into

Change Nickname [Back to Top]
Changes a user’s nickname in the server.
Your Discord Bot must have MANAGE_NICKNAMES permission.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
User ID User ID of the user to remove the role from. You can select it from the dropdown or input it manually.
New Nickname Member’s new nickname

Mute [Back to Top]
Mutes a user in a voice channel.
Bot must have MUTE_MEMBERS permission.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
User ID User ID of the user to remove the role from. You can select it from the dropdown or input it manually.
Mute Check to mute or uncheck to unmute the user

Deafen [Back to Top]
Deafens a user in a voice channel. Bot must have ‘DEAFEN_MEMBERS’ permission.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
User ID User ID of the user to deafen. You can select it from the dropdown or input it manually.
Deafen Check to deafen or uncheck to Un-Deafen a user

Move Channel [Back to Top]
Moves a user in a voice channel to a different voice channel.
Bot must have MOVE_MEMBERS permission.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
User ID - User ID of the user to deafen. You can select it from the dropdown or input it manually.
Channel ID New channel ID to move the user to (must be a voice channel)

Timeout [Back to Top]
Times out a user in a server and prevents them from sending messages for X amount of time.
Bot must have MODERATE_MEMBERS permission.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
User ID User ID of the user to deafen. You can select it from the dropdown or input it manually.
Timeout For For how long to time out the user
Timeout Type The units to time out the user in (seconds, minutes, hours, days)

If you wish to un-timeout a user, simply put 0 in the Timeout For box and execute the command again.

Search Member [Back to Top]
Searches for a specific member in your server by their nickname. Returns an array of all users matching the search query (can be more than one).

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Search Query Member’s nickname to search for (or their username if no nickname is set)
Save Variable Variable 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 [Back to Top]
Retrieves an array of all scheduled server events. Each event is an object.

Box Name Explanation
Discord Server ID Your Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Save Variable Variable name to save the result into

Example payload for a single event called Test event:

{
    "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 [Back to Top]
Creates a new event.
Bot must have ‘CREATE_EVENTS’ permission.

Box Name Explanation
Server ID Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Type even Type to create
Name Name of the event
Channel ID if the event Type is voice, select Channel ID
Location if the event Type is External, fill it out with location, i.e. city
Description Event description
Start Time Start time of the event. Must be in ISO8601 format. </br> - You can use Date/Time Math command to convert it.
End Time End time of the event. Must be in ISO8601 format. </br> - You can use Date/Time Math command to convert it.
Save Variable Variable name to save the response (optional). Will contain the whole event object you just created.

Delete Event [Back to Top]
Deletes an existing scheduled event.
Bot must have ‘MANAGE_EVENTS’ permission.

Box Name Explanation
Server ID Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Event ID Event ID to delete. Returned in Get Events or Create Event command.
Save Variable Variable name to save the response (optional). Will be set to ‘ok’ if the event was succesfully deleted.

Modify Channel [Back to Top]
Modifies specified channel. Leave empty to leave unchanged. Bot must have ‘MANAGE_CHANNELS’ permission.

Box Name Explanation
Server ID Discord server ID. Leave empty or at 0 to use your default one from INIT Settings button.
Channel ID Channel ID to modify. You can select it from the dropdown or input it manually.
Name New name for the channel
Topic New topic for the channel
NSFW whether the channel should be marked as NSFW
Save Variable Variable name to save the response (optional). Will contain the whole updated channel object

Modify Server [Back to Top]
Modifies a server. Leave boxes empty to leave the current values unchanged. Bot must have ‘MANAGE_GUILD’ permission.

Box Name Explanation
Server ID Discord server ID to modify. Leave empty to use your default one from INIT Settings button.
Name New name for the server
Description New description for the server
Icon New icon from the server - 1024x1024 recommended, png/jpeg/gif
Save Variable Variable name to save the response (optional). Will contain the whole updated server object
Privacy Policy
This developer has disclosed that it will not collect or use your data.

This developer declares that your data is:

  • Not being sold to third parties.
  • Not being used or transferred for purposes that are unrelated to the extension's core functionality
  • Not being used or transferred to determine creditworthiness or for lending purposes
Reviews

Coming soon!