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 ..
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 ..
Hi so im making a bot that changes the status every 10 minutes or so with different activites. Only problem its givng me a strange error. I tried changing Activit to Activity but it will give me a Runtime Error saying the task was launched and not completed. Then i have to run one of ..
Actually, i have a script who start a bot, who find a link on message posted on discord, and resend it with modified url. I want to remove just link on original message, and replace it by new modified link. Finally, it send original message only with new link. This is my script: async def ..
this is what i was saying about, let me explain its a scraper for the website https://disboard.com/ you put the keyword, and it scrapes that. But i want to make a few changes. Only save servers with 1000+ members Send servers as a reply 1 by 1 for example: !scrape fortnite and bot would return ..
this code worked fine when in the main file but when I’ve transferred it to a cog and made the usual small changes needed Ie. adding self and indenting more… I just can’t seem to get it to work. Either the bot will send any command response twice or it won’t store the data. Here’s ..
My script for the bot works individually. My event decorator block works individually. But somehow when they work together, my commands don’t run. What I am trying to do here is that I want to display the current ongoing bot’s prefix of the server whenever "gravy get prefix" is written. I can’t do this by ..
I am trying to figure out why a python trading bot connected to a td ameritrade account via their API is not working. I did not create the code but I am troubleshooting it. It is based on this code. https://github.com/areed1192/td-ameritrade-python-api The bot is not doing anything at all. The orders are not being triggered ..
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 ..