Category : bots

My code for 8ball is this: async def klausimas(ctx): choices = ["Blah blah blah", "Blah blah blah"] ranquestion = random.choice(choices) await ctx.send(ranquestion) How should I make it, so if someone for example asked this: "/klausimas is insert youtuber name good?" and the answer would be: "Yes, they are good." Could somebody help please? I don’t ..

Read more

I’m trying to make a discord.py bot with the help of nextcord and i’ve come far enough to make the code work in theory but nothing happens when i try to kick / ban, it just throws an nextcord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: ‘Context’ object has no attribute ‘kick’ and i have no idea ..

Read more

I want to make a bot deleting a message in a specific channel of a specific user if he sends a message in other channel and it contains a specific word or letter async def on_message(message): if ‘++’ in message.content: user = await bot.get_user(id) channel = bot.get_channel(x) if message.author.id == ‘user’ await message.delete() Source: Python ..

Read more