This documentation provides an overview of the custom Discord bot I developed. The bot enhances user engagement and provides utility within Discord servers by offering features such as rotating status messages, image-sharing commands, and interactive utilities.
/sb
Command: Sends a random speech bubble meme from a specified directory./bx
Command: Shares a link to a YouTube channel./dudu
Command: Shares a link to another YouTube channel./sike
Command: Sends a playful message.!info
Command: Provides information about the server.!poll
Command: Creates a poll with customizable options.The bot automatically rotates its status messages every 5 seconds. The statuses include playful messages to entertain users. No user intervention is required.
Note: The status messages are customizable and can be adjusted to suit the server's audience.
@tasks.loop(seconds=5)
async def change_status():
statuses = ["Example1", "Example2", "Example3", "Example4"]
await bot.change_presence(activity=discord.Game(random.choice(statuses)))
/sb
Command
Sends a random speech bubble meme from the bot's images
directory.
/sb
Usage Example:
/sb
/bx
CommandShares a link to the YouTube channel "bxbrian".
/bx
/dudu
CommandShares a link to the YouTube channel "dulonkk".
/dudu
/sike
CommandSends a playful message to the user.
/sike
!info
CommandDisplays information about the current server.
!info
!poll
CommandCreates a poll with up to two options. Users can vote by reacting with ✅ or ❌.
Usage Examples:
!poll "Is the bot helpful?"
!poll "Which feature do you like?" "Status Rotation" "Image Sharing"
The bot uses a task loop to change its status every 5 seconds:
@tasks.loop(seconds=5)
async def change_status():
statuses = ["Example1", "Example2", "Example3", "Example4"]
await bot.change_presence(activity=discord.Game(random.choice(statuses)))
/sb
Command Implementation
The bot sends a random speech bubble meme when the /sb
command is used:
@bot.tree.command(name="sb")
async def send_image(interaction: discord.Interaction):
image_dir = 'images'
images = os.listdir(image_dir)
if not images:
await interaction.response.send_message('No images found.', ephemeral=True)
return
image_file = random.choice(images)
image_path = os.path.join(image_dir, image_file)
await interaction.response.send_message(file=discord.File(image_path))
!poll
Command ImplementationThe bot creates a poll with reactions for users to vote:
@bot.command()
async def poll(ctx, question, option1=None, option2=None):
if option1 is None and option2 is None:
message = await ctx.send(f"**New poll:** {question}\n✅ = Yes\n❌ = No")
else:
message = await ctx.send(f"**New poll:** {question}\n✅ = {option1}\n❌ = {option2}")
await message.add_reaction('✅')
await message.add_reaction('❌')
/
) and traditional commands (prefixed with !
).statuses
list and speech bubble images can be customized to match the theme of your server.Planned features for future updates include: