ILLEST Developers

Status and activity

A bot shows a status and one line under its name, the way a person does: in the member list, on its profile wherever it is opened (a mention, a message, the list), and in direct messages. Everybody who shares a server or a conversation with the bot sees it, friend or not.

  • Online, Idle or Do not disturb, as a dot on its picture.
  • Invisible: shown as offline, while the bot stays connected and works as usual.
  • One line: Playing, Listening to, Watching or Streaming something, or words of its own.

A bot that is not connected is offline, with nothing under its name.

Without code

Open the bot's application on the developer portal, then its Bot page, and pick a status and a line under Status. The bot shows them the moment it connects, every time, and at once if it is connected when you save.

From code

Say it when the bot starts:

Python
import illest
from illest.ext import commands

bot = commands.Bot(
    command_prefix="!",
    intents=illest.Intents.default(),
    activity=illest.Activity(type=illest.ActivityType.watching, name="/help"),
    status=illest.Status.online,
)

Or change it at any time:

Python
import illest
from illest.ext import commands

bot = commands.Bot(command_prefix="!", intents=illest.Intents.default())


@bot.command()
async def busy(ctx):
    await bot.change_presence(status=illest.Status.dnd, activity=illest.Game("a long job"))


@bot.command()
async def back(ctx):
    await bot.change_presence(activity=illest.CustomActivity("Type /help to start"))
You writePeople see
illest.Game("chess")Playing chess
illest.Activity(type=illest.ActivityType.listening, name="the radio")Listening to the radio
illest.Activity(type=illest.ActivityType.watching, name="/help")Watching /help
illest.Streaming(name="the finals", url="https://...")Streaming the finals
illest.CustomActivity("Back soon")Back soon

status takes illest.Status.online, idle, dnd or invisible, or those words as text. Left out, the status stays as it was.

Each call replaces the line: an activity takes the place of custom words and the other way round, and activity=None clears it. bot.activity and bot.status are what the bot last showed.

What code sets lasts until the bot disconnects. When it connects again it starts from what its team picked on the portal, so a bot whose code sets nothing always shows the portal's choice, and a bot whose code sets one shows the code's.