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.


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:

NSFW Images Detection Output Example NSFW Images Detection Censored Image Example

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.


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.


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.


!nsfwcache 5d6c4cd78e422b00137d14ce


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.


!nsfwthreshold 80
!nsfwthreshold -

Permissions Needed

User: Manage Server

Other Tools


Command Syntax

!shorturl (long URL)

Command Description

Converts a long URL into a short URL using the proprietary gisl.eu shortening service.


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.


Command Syntax

!unitconvert (value) (unit) [destination unit]

Command Description

Converts between quantities in different units. It also supports converting currency with the most recent exchange rates.

The value and originating unit are mandatory. If the destination unit is omitted or invalid (e.g. non-existing, or a unit in a different measure, like trying to convert length to mass) then the “best” destination unit will be picked. For currencies, if the destination currency is omitted or invalid, USD will be automatically used.

See also

Click here for a list of all supported measurement units. Click here for a list of all supported currencies.


!unitconvert 10 EUR USD
!uconv 1000 mm
!uconv 30 C F
!uconv 1 MB b


Command Syntax

!clockchannel (time zone name) [--template {custom channel name template}] [--12ht]

Command Description

Creates a channel as “clock channel”, updating its name every minute. You must specify the time zone name: if you need to search for a valid time zone name, use the !searchtz command.

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%.


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).

Permissions Needed

User: Manage Channels, Manage Server
Bot: Manage Channels, Connect


!clockchannel UTC
!clockchannel Europe/London --12ht
!clockchannel America/New_York --template Current Time: %clock%


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.


!searchtz US
!searchtz New


Command Syntax

!urban (search string) [--more]

Command Description

Urban Dictionary text lookup. The output will be the highest ranked result. The embed title will hyperlink to the corresponding online page.

Using --more will show up to 5 results, if available.


Given the nature of the website, Urban Dictionary lookups will only be executed in channels that are marked as NSFW.


!urban guinea tee