Image Command Priorities

OcelotBOT's image commands, such as !bulge or !rainbow all follow the same logic for determining which image will be used for a command.

Low Level Order

1. Does the replied message (if any) start with a URL

If the message starts with a URL, it will always be used even if it is not an image URL. Only raw image URLs or gfycat or tenor GIFs are valid.

2. Does the replied message (if any) have an attachment

If there are multiple attachments, the first image attachment is used.

a. For multi-image commands (tile, overlay)

3a. Is the nth* argument in the command a user mention

If it's a user mention, the mentioned user's avatar is used

4a. Is the nth* argument a tenor GIF

Tenor URLs will be parsed into GIF URLs

5a. Is the nth* argument a gfycat GIF

Gfycat URLs are are also parsed

6a. Is the nth* argument an emoji

Emojis will be extracted and used

b. For all other image commands

3b. Does the second argument contain a URL

Again, any URL even invalid or non-image URLs will be counted

4b. Does the first argument contain a URL

5b. Does the first argument contain an emoji

6b. Does the second argument contain an emoji

For both

7. Do any of the previous x** messages contain start with a URL

Even an invalid or non-image URL will be counted here

8. Do any of the previous x** messages contain attachments

As before, the first image attachment is used

9. Do any of the previous x** messages contain embeds

If a message contains multiple embeds, only the first is used. Only the embed's image will be used, not the author or thumbnail fields, or any URLs in the embed.

*for overlay the back image is n = 1 and the front image is n = 2, for the tile it is left = 1 and right = 2
**Similarly, the first valid image is skipped for the second arguments for tile and overlay

Examples

A message containing an emoji and then a URL will pick the emoji over the URL, except for tile/overlay commands.

  • Avatar
    Big P

    !bulge 🤔 https

  • Avatar
    OcelotBOT

    A bulged think emoji

A previous message with an emoji will not work

  • Avatar
    Big P

    🤔

  • Avatar
    Big P

    !bulge

  • Avatar
    OcelotBOT

    ⚠ No image found.