bots

How Run_daily works (JobQueue || Python telegram bot)

How Run_daily works (JobQueue || Python telegram bot) Question: Testing simple bot that should send message every day at certain time. When i was testing run_repeating it worked normally. But when i use run_daily it’s just doesn’t send anything end ignore time in the parameters. I checked documentation and everything seems normal. But it’s just …

Total answers: 2

Bot posting embed 7 times

Bot posting embed 7 times Question: I have got this application bot and made some changes to it but everytime we finsh answering the questions the posts the embed 7 times as well as sending the "thank you" meaasage 7 times in the DM’s Im looking for the bug but can’t work it out, here …

Total answers: 1

discord.py's client.user.edit method generating error

discord.py's client.user.edit method generating error Question: I have created a discord price bot. It gets the price from the API and updates the nickname of my discord bot with that value. But I keep getting the error discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body In username: You are changing your username or …

Total answers: 1

MessageHandler not able to catch commands

MessageHandler not able to catch commands Question: we would like to monitor users who send commands to the bot, but when the bot is started, the messagehandler is able to catch messages and report that a private chat is started, but it seems that it can’t catch any of the three pre-defined commands(which are working …

Total answers: 1

Web Search Automation with Python/Selenium

Web Search Automation with Python/Selenium Question: I’m trying to access a search box on a website and I keep getting a ‘not JSON serializable’ error. Not quite sure what I am doing wrong should be pretty simple, can anyone spot the issue, is it because I haven’t set a specific file path for ‘webdriver.Chrome()’ or …

Total answers: 1

How to detect a MtCaptcha captcha with Selenium?

How to detect a MtCaptcha captcha with Selenium? Question: I need some help. In my Python code using the Selenium module, the identifier mtcap-image-1 on the website https://top-serveurs.net/gta/vote/midnight-rp is not recognized by Selenium. I would like to know if it is possible to make Selenium recognize a MtCaptcha captcha or if I need to use …

Total answers: 1

How do I close my Discord bot after it sends a message?

How do I close my Discord bot after it sends a message? Question: I am using a bot to send a message in between a program, utilising it as a function. def sendmessage(message): @client.event async def on_ready(): print(f'{client.user} has connected to Discord!’) CHANNEL_ID = (ID) channel = client.get_channel(int(CHANNEL_ID)) await channel.send(message) print("sent") client.run(TOKEN) After it sends …

Total answers: 1

Trying To Make a Discord Bot – Error Role Not Found

Trying To Make a Discord Bot – Error Role Not Found Question: I have asked this question on the Replit forum but the developers are unsure of the problem. My friend and I want to add a function to our bot that gives a user the role Baguette_Team, and posts a message saying that they …

Total answers: 1

How to add images with Discord API and Python Requests

How to add images with Discord API and Python Requests Question: I want to send an image that I have stored on my computer through this code import requests import time headers = {‘authorization’: TOKEN, ‘Content-Type’: ‘application/json’} url = f"https://discord.com/api/v9/channels/{CHANNEL}/messages" data = { "content": message } files = { ‘file’: (open(‘image.png’, ‘rb’)), } r = …

Total answers: 1

TypeError: 'NoneType' object is not subscriptable, Discord Python Bot Mysql

TypeError: 'NoneType' object is not subscriptable, Discord Python Bot Mysql Question: Raw code: @ loop(hours=12) async def ticket_clear(): # try: cur.execute("SELECT auth_id, chann_id from tickets") for (auth_id, chann_id) in cur: channel = client.get_channel(chann_id) if (channel): return else: cur.execute( f"DELETE from tickets WHERE chann_id=%s", ((chann_id),)) conn.commit() # except: # print("Reconnecting") # await reconnect() Have some code …

Total answers: 1