ilhamteymurlu / discord-bot

0 stars 0 forks source link

bot #1

Open ilhamteymurlu opened 1 week ago

ilhamteymurlu commented 1 week ago

import discord import random from discord.ext import commands import os intents = discord.Intents.default() intents.message_content = True

bot = commands.Bot(command_prefix='$', intents=intents)

@bot.command() async def meme(ctx): rstresim = random.choice(os.listdir('images')) with open(f'images/{rstresim}', 'rb') as f: picture = discord.File(f) await ctx.send(file = picture)

bot.run("token")