Basic ping/pong bot
Basic ping/pong bot
The simplest possible alterself bot. It connects to the gateway, prints your username when ready, and responds to
.ping with your current latency.Echo + delete original
Echo + delete original
Deletes your trigger message and re-sends its content as a clean message in the same channel. The
aliases=["say"] parameter means both .echo and .say work.ctx.delete() removes the original command invocation message. If you lack permission to delete messages in that channel, an HTTPError with code 50013 is raised. Consider wrapping this in a try/except.Auto-react to a specific user's messages
Auto-react to a specific user's messages
Watches every incoming message and adds a heart reaction whenever a specific user posts. Replace
TARGET_USER with the user’s numeric ID.DM logger
DM logger
Prints every incoming direct message to your console with a timestamp. Guild messages are ignored so your logs stay clean.
Admin Cog with purge command
Admin Cog with purge command
Groups admin commands inside a
Cog class to keep your project organised. The purge command deletes the last n messages in the current channel (default: 10).Guild joiner via invite codes
Guild joiner via invite codes
Joins a list of Discord servers from their invite codes, with a 1.5-second delay between each join to stay under rate limits. Runs without a persistent gateway connection.
CaptchaChallenge can be raised by http.join_guild() if Discord requires verification. See the Error Handling guide for details on how to handle it.Presence cycling
Presence cycling
Rotates through a list of activities every 60 seconds using a background
asyncio task. The task starts automatically once the gateway is ready.