Utility Commands
This module contains generally useful, atomic commands that aren't otherwise categorized into a dedicated module.
These commands might be safe for use by anyone, or locked behind in-Discord permissions.
NSFW Images Detection Tools
GiselleBot implements an (experimental) **NSFW images detection system** using **TensorFlow.js** as its base.The detection system is based on Infinite Red's NSFW JS library and GantMan's Inception v3 Keras Model for NSFW detection to classify any image as a composition of 5 categories:
- Drawings: Safe for work drawings (including anime).
- Hentai: Hentai and pornographic drawings.
- Neutral: Safe for work neutral images.
- Porn: Pornographic images, sexual acts.
- Sexy: Sexually explicit images, not pornography.
The module was furtherly converted into a back-end module and customized with a caching system to enhance its performance.
See also
This interesting article by Infinite Red explains the reasons behind the creation of the original NSFW JS client-side module.
Warning
This module, by no means, is supposed to reliably recognize all NSFW images. Its main purpose is quickly classifying provided images and supporting humans in better moderating a server.
The module itself will not store or expose any sexually explicit images. The output will not contain a direct link to the original image, and a censored (low resolution, blurred) version of the image will be locally cached and used to refer to the original image.
Here's an example of an output of this command, and the corresponding censored image:


See also
For those of you with a background in image processing - yes, Lenna is actually flagged as NSFW with a confidence score of 81.9%!
If you don't know what I'm talking about, refer to this Wikipedia page.
!nsfwcheck
Command Syntax
!nsfwcheck (image URL, or image as a message attachment)
Command Description
Submits an image against the GantMan's Inception v3 Keras Model for NSFW detection (as explained above) and returns a detailed output about the classification.
Examples
!nsfwcheck http://www.lenna.org/lena_std.tif
!nsfwcache
Command Syntax
!nsfwcache (cache ID)
Command Description
Recalls an image classification output by its cache ID (as given in the footer of the !nsfwcheck command.
Examples
!nsfwcache 5d6c4cd78e422b00137d14ce
!nsfwthreshold
Command Syntax
!nsfwthreshold [new threshold, or "-"]
Command Description
While the classification scores given to an image cannot be tuned, each server can choose its own NSFW threshold (the sum of NSFW-related scores over which an image is considered NSFW).
The new threshold is an integer within the range [0, 100], inclusive of 0 (treat all images as NSFW) and 100 (only treat an image as NSFW if the model recognize it as having no-SFW components - which is highly unlikely, hence basically meaning "treat no images as NSFW").
Running the command with - as argument will reset the server threshold to the global, default threshold of 60%.
Running the command with no arguments will show the current value for the server.
Examples
!nsfwthreshold 80 !nsfwthreshold - !nsfwthreshold
Permissions Needed
- User: Manage Server
Server-related Tools
!serverinfo
Command Syntax
!sinfo
Command Description
Prints a bunch of info about the current server.
!serverbots
Command Syntax
!sbot [--detail]
Command Description
Prints the full list of bots that are present in the server.
If the --detail additional parameter is used, the command will attempt scanning the top 3 most used bot listing websites to get info about the bot owner, and post a link to the found page.
The command will scan:
- Top.gg / Discord Bot List: https://top.gg/
- Bots on Discord: https://bots.ondiscord.xyz/
- Discord Bots: https://discord.bots.gg/
This additional scan is usually very slow (about ~5 seconds per bot).
!serveremojis
Command Syntax
!semoji
Command Description
Shows all of the emojis from the current server into an embed.
!createinvite
Command Syntax
!createinvite [--channel {channel id/mention/q_name}] [--expire {duration timecode}] [--uses {# of uses}] [--unique] [--temporary] Command Description
Creates an instant invite to the current server. All parameters are optional, here are the meanings of eaach parameter and the default values:
--channelselects a target channel for the invite. The user running the command must have "View Channel" and "Create Instant Invite" permissions on the target channel. Default: the current channel.--expiresets how long the invite should last (use the time code syntax, e.g.1h). Default: no expiration.--usessets the maximum number of uses for the invite. Default: unlimited uses.--uniquecreate a unique invite if selected, or uses an existing one with similar settings otherwise. Timed invites are always unique by default. Default: false (use an existing if available).--temporarysets whether members that joined via the invite should be automatically kicked after 24 hours if they have not yet received a role. Default: false.--aliasadds an optional alias (one word, maximum 32 characters long) to the invite. If the Members logger with invites tracking is active (refer to the Logger section in the Administration module documentation) the alias will be shown under "Using Invite: ...". Default: no alias.
Permissions Needed
- User: Manage Server, Create Instant Invite
- Bot: Create Instant Invite
!pruneinvites
Command Syntax
!pruneinvites [--channel {channel id/mention}] [--inviter {user id/mention}] [--uses {# of uses (inclusive) to consider invites "unused"}] Command Description
Deletes unused invites (invites with 0 uses), or invites under a certain number of uses (inclusive). You can specify the number of uses to consider an invite as "unused" with --uses.
You can filter by invite target channel through the --channel parameter, or by inviter through the --inviter parameter.
Up to 100 invites will be pruned for each command use. If you need to prune more than that, use the command multiple times. This command might be slow and seem temporarily unresponsive for high amount of invites being pruned.
Permissions Needed
- User: Manage Server
- Bot: Manage Server
Examples
!pruneinvites --inviter 123456789098765432 !pruneinvites --channel #greeter --uses 5
!invitesusage
Command Syntax
!invitesusage [--channel {channel id/mention}] [--inviter {user id/mention}] Command Description
Shows usage stats about active invites in the current server.
You can filter by invite target channel through the --channel parameter, or by inviter through the --inviter parameter.
Permissions Needed
- User: Manage Server
- Bot: Manage Server
!searchuser
Command Syntax
!searchuser (user id/mention)
Command Description
Searches for a user and returns the known info about that user.
Examples
!searchuser @cycloptux#1543 !searchuser 123456789098765432
Message-related Tools
!publish
Command Syntax
!publish [message id(s)] [--channel {channel id/mention/q_name}] Command Description
This command will publish one or more messages sent into an Announcement Channel. For more info about Announcement Channels and the publish feature, you can check this link from Discord.
By default, the command will look for messages in the current channel. You can, however, specify a different channel using the --channel tag. Please make sure that the target channel is an Announcement Channel, otherwise GiselleBot will throw an error.
If the message ID(s) are omitted, GiselleBot will attempt to publish the most recent message (above the command itself).
You can also specify one or more ID(s) to publish specific messages from the target channel.
Note
This specific command is particularly useful for mobile users, until Discord adds the ability for the mobile client to publish messages through the UI.
Permissions Needed
While technically available to everyone, this command will check for the correct permissions for a user to be able to post/publish a message, according to Discord limitations:
- Send Messages Permission will let you publish your own messages in the Announcement Channel
- Manage Messages Permission will let you publish all messages in the Announcement Channel
This also applies to GiselleBot: Manage Messages Permissions will be required to publish messages coming from other users, but Send Messages Permissions will be enough to make GiselleBot publish its own messages (e.g. messages sent through the !msgsend command).
Examples
!publish !publish 123456789098765432 234567890987654321 !publish 123456789098765432 --channel #announcements
!autopublishsetup
Command Syntax
!autopublishsetup [channel id/mention/q_name]
Command Description
This command will open an interactive menu to configure the auto-publish feature on a target channel, provided the channel is set as an Announcement Channel. For more info about Announcement Channels and the publish feature, you can check this link from Discord.
You can manually publish messages through GiselleBot using the !publish command. Through the use of the auto-publish feature, however, you can set certain Announcement Channels to have all messages (or a subset of messages) automatically published upon being sent.
Options 1. and 2. are used to save the settings you applied through the menu (the settings will not apply until you save them), or discard said changes.
- "Publish all messages" will automatically publish all messages sent into the target channel. When this setting is enabled, enabling or disabling any of the subsequent settings will not have any effect.
- "Publish all user messages" will automatically publish all messages coming from real users, ignoring bot messages and webhook/integration messages.
- "Publish all bot messages" will automatically publish all messages coming from bots, but ignore webhook/integration messages.
- "Publish all webhook messages" will automatically publish all messages coming from webhooks or external integrations.
- "Publish if the user/bot has at least one of these roles" will automatically publish messages coming from bots or users having certain roles, and ignore webhook/integration messages or messages coming from bots/users not having any of those roles.
Note
You can configure options 4, 5, 6, and 7 in any mixed set to achieve the desired behavior. Please note that options 4 and 5 will override the role requirements configured through option 7 on the corresponding entity.
If the Messages log is enabled in a server channel, each automatically published message will generate an entry into that log. Even publishing errors (e.g. due to rate limits) are logged.
Please refer to the Logger section in the Administration module documentation.
Permissions Needed
- User: Manage Server
Manage Server Permissions are required to open the configuration menu.
For the "publishing" permissions themselvers, this command will check for the correct permissions for a user to be able to post/publish a message, according to Discord limitations:
- Send Messages Permission will let you publish your own messages in the Announcement Channel
- Manage Messages Permission will let you publish all messages in the Announcement Channel
This also applies to GiselleBot: Manage Messages Permissions will be required to publish messages coming from other users, but Send Messages Permissions will be enough to make GiselleBot publish its own messages (e.g. messages sent through the !msgsend command).
Examples
!autopublishsetup !autopublishsetup #announcements
!autoreactsetup
Command Syntax
!autoreactsetup [channel id/mention/q_name]
Command Description
Through the use of the auto-react feature, you can set pick a group of emojis that will be added to all messages (or a subset of messages) posted in a certain channel. You can enable this feature in more than one channel, and each channel can have a different set of emojis.
You can select up to 20 emojis per channel. You can select native (Unicode) emojis, or custom emojis as long as the emoji is available in the current server.
There is a server-wide rate limit to the amount of emojis that can be applied through the auto-react feature in a certain amount of time. GiselleBot will stop adding reactions after hitting 50 reactions in 5 minutes, on a rolling time window.
This command will open an interactive menu to configure the auto-react feature on a target channel.
Options 1. and 2. are used to save the settings you applied through the menu (the settings will not apply until you save them), or discard said changes.
- "Select emojis" will allow you to set 1 or more emojis, specific to the channel you are configuring, that will automatically be applied to new messages according to the following conditions. An empty list will effectively disable the auto-react feature.
- "Publish all messages" will automatically publish all messages sent into the target channel. When this setting is enabled, enabling or disabling any of the subsequent settings will not have any effect.
- "Publish all user messages" will automatically publish all messages coming from real users, ignoring bot messages and webhook/integration messages.
- "Publish all bot messages" will automatically publish all messages coming from bots, but ignore webhook/integration messages.
- "Publish all webhook messages" will automatically publish all messages coming from webhooks or external integrations.
- "Publish if the user/bot has at least one of these roles" will automatically publish messages coming from bots or users having certain roles, and ignore webhook/integration messages or messages coming from bots/users not having any of those roles.
Note
You can configure options 5, 6, 7, and 8 in any mixed set to achieve the desired behavior. Please note that options 5 and 6 will override the role requirements configured through option 8 on the corresponding entity.
Permissions Needed
- User: Manage Server
- Bot: Add Reactions
Manage Server Permissions are required to open the configuration menu. Add Reactions (on the role, or on a specific channel) are required for GiselleBot to actually react on new messages.
Examples
!autoreactsetup !autoreactsetup #news
!rawmessage
Command Syntax
!rawmsg (message id) [--channel {channel id/mention}]
!rawmsg (message URL) Command Description
Shows a specific message content in its "raw" version, making markdown-formatted messages or embeds easy to copy and paste.
Embeds can be re-sent through GiselleBot using the !msgsend command. This might not work 100% of the times for complex embeds.
Examples
!rawmsg 123456789098765432 !rawmsg 123456789098765432 --channel #rules !rawmsg https://discord.com/channels/533372744130363392/534171951732752394/534751296847216642
!savechat
Command Syntax
!savechat [# of messages]
Command Description
Dumps a certain number of messages from the channel in which the command is run. The saved messages are compiled into a .csv file.
The file will be sent to the author of the command via Direct Message. Instead of receiving the actual file as Discord attachment, the author will receive:
- An URL to an encrypted
.zipfile containing the actual.csv. - The password to decrypt the archive.
Note
The archive password is unknown to anyone but the author of the command, not even the bot developer! The archive will only be available for 30 days, after which it will be deleted.
If the number of messages isn't specified, the default value of 150 messages will be used. The maximum number of messages you can save is 2000.
Warning
This command might be very slow, or even fail, if you are trying to dump a high amount of messages. Please be patient.
Permissions Needed
- User: Manage Messages
Examples
!savechat 500
!pin
Command Syntax
!pin [message ID(s)]
Command Description
Pins one or more messages in the current channel. Provide no arguments to pin the latest message in the current channel (before the actual !pin command message).
Permissions Needed
- User: Manage Messages
- Bot: Manage Messages
Examples
!pin !pin 123456789098765432 !pin 123456789098765432 234567890987654321 345678909876543212
!unpin
Command Syntax
!unpin [message ID(s)]
Command Description
Unpins one or more messages in the current channel. Provide no arguments to unpin the latest message in the current channel (before the actual !unpin command message).
Permissions Needed
- User: Manage Messages
- Bot: Manage Messages
Examples
!unpin !unpin 123456789098765432 !unpin 123456789098765432 234567890987654321 345678909876543212
!toggleembed
Command Syntax
!temb [message ID(s)]
Command Description
Hides or unhides an embed in a message in the current channel. Provide no arguments to hide/unhide the latest message containing an embed in the channel.
Permissions Needed
- User: Manage Messages
- Bot: Manage Messages
Examples
!temb !temb 123456789098765432 !temb 123456789098765432 234567890987654321 345678909876543212
!emojify
Command Syntax
!emojify (any number of emoji names, without the : :)
Command Description
Converts a sequence of words into a sequence of emojis, provided the bot has access to the emojis.
Emoji names are case-sensitive.
By default, this command only tries to fetch emojis from the current server, effectively limitating its usefulness.
By setting one, or more, server(s) as emojify source servers using the !emojifysource command, GiselleBot will look for emojis in those servers as well as the current server when the !emojify command is used.
Examples
!emojify BlobOwO BlobPats
!emojifyverbose
Command Syntax
!emojifyverbose (emoji name, without the : :)
Command Description
Converts one word into the corresponding emoji, provided the bot has access to that emoji. The response will also include info about the server where the emoji was fetched from.
Emoji names are case-sensitive.
By default, this command only tries to fetch emojis from the current server, effectively limitating its usefulness.
By setting one, or more, server(s) as emojify source servers using the !emojifysource command, GiselleBot will look for emojis in those servers as well as the current server when the !emojify command is used.
Examples
!emojifyverbose BlobOwO
!emojifysource
Command Syntax
!emojifysource [server id(s)]
Command Description
By default, the !emojify command only tries to fetch emojis from the current server, effectively limitating its usefulness.
By setting one, or more, server(s) as emojify source servers, GiselleBot will look for emojis in those servers as well as the current server when the !emojify command is used.
Note
If used without any server ID, this command will show the current list of servers that are set as emojify source.
If used with one or more server IDs, it will toggle each server into the list of servers that will be used as emojify source servers.
When a server is set as unavailable through the !emojifyexclude command, it will appear with a :no_entry: sign.
Permissions Needed
- User: Manage Emojis and Stickers
Examples
!emojifysource !emojifysource 123456789098765432 234567890987654321 345678909876543212
!emojifyexclude
Command Syntax
!emojifyexclude
Command Description
Makes the emojis contained in the server where the command is run unavailable to the !emojify command.
Run the command again to toggle the exclusion status of the server.
When a server is set as unavailable, it will appear with a :no_entry: sign through the !emojifysource command.
Permissions Needed
- User: Manage Server
!embed
Command Syntax
!embed (embed json built with https://discohook.org/, or using embed enhancer tags)
Command Description
Answers to the author's message with an embedded message.
In order to customize your embed, you can either use:
- Discohook
- The available embed enhancer tags
Embed enhancer tags are words in the form {tag} that are used to set a few fields of an embed. Currently, these tags are supported:
{title}sets the title for the embed.{url}sets an URL for the embed, which means clicking on the title will bring users to the specified URL.{footer}sets the footer for the embed (the small text at the bottom of the embed).{color}sets the color for the embed. You need to use an hex code to select a color.{image}and{thumbnail}will set the bottom image and top-right thumbnail within the embed.
See also
Do you need ideas for your embed color? Try these links: Random Hex Color Code Generator HTML Color Picker BrandColors
Note
A few things to know when building your embed with the enhancer tags:
- Tags have to start on a new line, surrounded by
{ }parenthesis. - URLs have to be complete and correct, including the http*:// prefix.
- Supported image formats are
*.png,*.jpg,*.jpeg. - If you need to add something that looks like an enhancer tag in your recruitment message, you can "escape" by prepending it with
\
Warning
Discord's native limits for embeds still apply.
Examples
!embed { "description": "Hello world!" }
!embed {title} Hey I'm recruiting! This is my title, it can hold up to 256 characters!
{color} #ffffff
{footer} This is your fancy footer text.
{url} https://discord.gg/bravenetwork
{image} https://b.thumbs.redditmedia.com/t5OGyddII6m8aBeYlSDXUkvJeOVYP4DpH594oqgnn7U.png
{thumbnail} https://i.imgur.com/HoBQiSI.png !deletedm
Command Syntax
!deletedm (message id)
Command Description
Note
This command is only available in a Direct Message channel with the bot. It will not work in actual servers, and it's not subject to any permissions.
Deletes a direct message sent by the bot. This can be particularly useful as a privacy/security feature to delete previously sent passwords to encrypted archives, in order to make them completely unrecoverable.
See also
Refer to Discord IDs if you don't know how to obtain a message ID.
Note
Non-sensitive direct messages (e.g. moderation actions) might still be logged into the owner-restricted bot console.
Examples
!deletedm 123456789098765432
Role-related Tools
!roleid
Command Syntax
!rid (role name, or a substring of the role name)
Command Description
Finds the roles that correspond to the provided name (or substring thereof), and shows a list of such roles and the corresponding IDs. The lookup string is case-insensitive.
Examples
!roleid Discord Moderator !rid moder
!inrole
Command Syntax
!inrole (role id/mention/name) [--format (id/mention)]
Command Description
Prints the list of users that currently have the specified role. Users will be printed using their username (default behavior), but you can use the --format parameter to specify whether you want the list to be printed using the user IDs or mentions.
The list will always be sorted in alphabetical order based on the users' usernames.
Examples
!inrole Discord Moderator !inrole 123456789098765432 --format mention !inrole Verified --format id
!addrole
Command Syntax
!addrole (user id(s)/mention(s)/q_name(s)) (role id(s)/mention(s)/q_name(s))
Command Description
Adds any number of roles to any number of users. If @everyone (or the server ID) is used as one of the parameters, the role(s) will be given to everyone in the server.
Permissions Needed
- User: Manage Roles
- Bot: Manage Roles
Examples
!addrole "Discord Moderator" @cycloptux#1543 NaviKing#3820 !addrole cycloptux#1543 Staff "Network Developer"
!remrole
Command Syntax
!remrole (user id(s)/mention(s)/q_name(s)) (role id(s)/mention(s)/q_name(s))
Command Description
Removes any number of roles from any number of users. If @everyone (or the server ID) is used as one of the parameters, the role(s) will be removed from everyone in the server.
Permissions Needed
- User: Manage Roles
- Bot: Manage Roles
Examples
!remrole "Discord Moderator" @cycloptux#1543 NaviKing#3820 !remrole cycloptux#1543 Staff "Network Developer"
Other Tools
!shorturl
Command Syntax
!shorturl (long URL)
Command Description
Converts a long URL into a short URL using the proprietary gisl.eu shortening service.
Note
URLs shortened using the gisl.eu service never expire, unless deleted by the person that created the short URL (feature not available yet). The original URLs are saved as encrypted strings within the redirection database. Any sensitive data contained in the URL (authentication keys, login info, etc.) will not be exposed in case of a breach.
Examples
!shorturl http://www.amazon.com/Kindle-Wireless-Reading-Display-Globally/dp/B003FSUDM4/ref=amb_link_353259562_2?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-10&pf_rd_r=11EYKTN682A79T370AM3&pf_rd_t=201&pf_rd_p=1270985982&pf_rd_i=B002Y27P3M
!snowflaketime
Command Syntax
!snowflaketime (Discord snowflake)
Command Description
Extracts the time from a valid Discord snowflake, showing it in multiple relative and absolute formats.
Examples
!snowflaketime 123456789098765432
!checkphishing
Command Syntax
!checkphishing (URL)
Command Description
Checks whether an URL is included in the phishing domains list.
Examples
!checkphishing https://discordc.gift/
!clockchannel
Command Syntax
!clockchannel (time zone name) [--template {custom channel name template}] [--12ht] Command Description
Creates a channel as "clock channel", updating its name every 15~60 minutes.
You must specify the time zone name: if you need to search for a valid time zone name, use the !searchtz command. In addition to the listed time zones, custom UTC offsets are supported, in the form of [UTC/GMT](+/-)(hours)[:][minutes]. Here are some valid examples:
- -9
- +800
- -230
- -10:30
- UTC+2
- GMT-4:30
- ...
Note
Beware that the offset forms of the Etc/UTC area have a counterintuitive behavior, having their sign reversed from the standard ISO 8601 convention (e.g. "Etc/GMT-14" is 14 hours ahead of GMT) (more info: Tz database Area). If you want to specify a custom offset, use the simple "UTC" form instead of "Etc/UTC", as stated above.
You can set a custom template for the channel name. You can use one (or more) of these placeholders in your custom channel name template:
- %time_zone% or %tz%: This will be replaced with the name of the chosen time zone.
- %clock%: This will be replaced with the auto-updating clock.
- %date%: This will be replaced with the current date.
Additionally, you can add the --12ht parameter if you want the clock to be shown as 12 hours time.
By default, the channel name template is %time_zone%: %clock%.
Note
Premium: Out of the box, each server is limited to having 1 clock channel. You can unlock up to 5 different clock channels as a Premium feature (see Premium Perks). Clock update frequency cannot be changed.
Note
Due to unusual rate limits applied by Discord on channel updates, clock channels will update once every 30 minutes. This time frame may change, or clock updates may be skipped, depending on the API traffic being generated by the bot.
Permissions Needed
- User: Manage Channels, Manage Server
- Bot: Manage Channels, Connect
Examples
!clockchannel UTC !clockchannel GMT-8 !clockchannel Europe/London --12ht !clockchannel America/New_York --template Current Time: %clock%
!clockchanneldelete
Command Syntax
!clockchanneldelete [channel id/mention/name]
Command Description
Deletes a clock channel, bypassing Discord's implicit denial: normally, "Manage Channels" does not apply if the user doesn't have "Connect" permissions to the channel. As long as GiselleBot has "Connect" permissions, this channel will allow users to delete the clock channel.
You can omit the channel identifier if you are connected to the clock channel when you run the command.
Permissions Needed
- User: Manage Channels, Manage Server
- Bot: Manage Channels, Connect
Examples
!clockchanneldelete 123456789098765432 !clockchanneldelete UTC Time: 9:10 AM
!searchtz
Command Syntax
!searchtz (country code or lookup string)
Command Description
Searches for a valid time zone name.
Using a 2-letters country identifier will show the available time zones for the specified country.
Using any 3+ characters string will search for matching time zones.
Examples
!searchtz US !searchtz New
!membercountchannel
Command Syntax
!membercountchannel [--template {custom channel name template}] Command Description
Creates a channel as "member count channel", showing the total amount of users that are currently in the server, updating its value every hour.
You can set a custom template for the channel name. If you do so, you must use the %count% placeholder in your custom channel name template.
By default, the channel name template is Members: %count%.
You can only have 1 member count channel up at any time.
Permissions Needed
- User: Manage Channels, Manage Server
- Bot: Manage Channels, Connect
Examples
!membercountchannel !membercountchannel --template Current Users: %count%