discord.py Questions

2

Solved

I am writing a class and want to use an async function in the __init__ method to set up some variables needed for the class. The problem is, I can't do that, because __init__ has to be synchronous....
Cholecystitis asked 15/4, 2019 at 19:28

2

So recently ive been receiving the error in the title. Im unsure what is causing the problem, it randomly stopped the bot was working about a week ago fine. Ive done my googling and yet still have ...
Lipsey asked 22/10, 2020 at 1:27

4

I am trying to make my discord bot send a jpg file to my discord server, but I keep getting an error that seems pretty uncommon as I can not find any solutions to it on the internet... the error i...
Condescending asked 14/6, 2018 at 14:55

4

I've recently created a bot which is only allowed to send messages and read message history. In my own servers, the bot seemed to work flawlessly, but a certain user tried using the bot on his own ...
Daimyo asked 30/6, 2019 at 4:38

2

Im using Discord.py and Im trying to get the Discord userid of a user when they type into a channel. The userid can be found when you go into developer mode, and right click on a username, there ...
Tresatrescha asked 21/4, 2017 at 12:58

3

Solved

I'm working on a small discord bot for a server I made, however I've run into a problem. Whenever I try to run the bot (using python3.4 lilac.py), I get the following error: Traceback (most recent...
Numbing asked 26/8, 2017 at 4:51

12

Trying to run my .py file from CMD, but it can't find the discord module >>File 'C:\Users\\****\Desktop\Discord_Bot\main.py', line 1, in module >>import discord >>ModuleNotFou...
Neurasthenia asked 17/4, 2018 at 19:36

6

Background: I am hosting a flask server alongside a discord client The flask server just needs to pass on messages from the client to discord and from messages from discord to the client. I am ge...
Brandybrandyn asked 8/9, 2018 at 5:3

6

Solved

I am building a Discord bot in Python and would like to receive HTTP requests from Twitch.tv's API (See Webhooks Guide & Webhooks Reference) (To subscribe to events like; X streamer has gone li...
Imperturbation asked 8/2, 2018 at 19:9

3

Solved

I am trying to create a Discord bot with Python, however whenever I run the sample code here: import discord client = discord.Client() @client.event async def on_message(message): # we do not w...
Athlete asked 24/8, 2019 at 16:35

7

I'm writing a discord bot using discord.py rewrite, and I want to run a function every day at a certain time. I'm not experienced with async functions at all and I can't figure out how to run one w...
Baptistery asked 26/7, 2018 at 2:10

7

I've been working on a Discord bot, and I'd like to make things more custom. I've been trying to make the bot send embeds, instead of normal messages. embed = discord.Embed(title="Tile", ...
Kashmiri asked 1/7, 2017 at 14:36

6

I'm using discord.py to create a discord bot, and I need to execute certain actions every day at a specific time. I saw this answer: How to make a loop in discord.py rewrite? and I've been using it...
Tankard asked 27/8, 2020 at 23:2

5

Solved

trying to download discord.py using pip install, gave me the error message in the title. I installed using cmd and the commands py -m pip install -U discord, the cmd was also run in admin. tried us...
Palaeography asked 23/10, 2020 at 9:19

12

I'm trying to code a simple discord bot in python, but it says i cant import load_dotenv, instead giving me this error: Traceback (most recent call last): File "/home/pi/Rotomi/Rotomi.py", line 5...
Giorgia asked 7/1, 2020 at 5:50

2

Solved

I have an extremely basic script that pops up a message with a button with the command ?place Upon clicking this button the bot replies Hi to the user who clicked it. If the button isn't interacted...
Coincidentally asked 19/5, 2022 at 23:33

18

Solved

I've looked in a lot of places and I can't find a way to make a ping (latency) command using discord.py, something like this: @client.command(pass_context=True) async def pong(ctx): # Somehow fin...
Manful asked 19/9, 2017 at 18:1

10

I'm using Pycharm and python 3.8 and latest version of discord. I tried to run this script but got this error. Can anyone help? import discord TOKEN = 'xxxxx' client = discord.Client() @client...
Coon asked 19/12, 2019 at 14:5

7

I have trouble with making an "add role" command in discord.py. I don't know what is wrong; it just doesn't work. @client.command() @commands.has_role("Admin") async def addrole...
Secretarygeneral asked 2/3, 2018 at 20:24

6

I'm currently working on a discord bot and I'm trying to send a message to a specific channel using Discord.py rewrite once the user levels up, and I'm getting this error: await channel.message.s...
Staggs asked 9/12, 2019 at 20:2

6

I am new to programming. I am trying to have my discord bot open up command prompt to confirm it can run, but I am getting this error: File "C:\Users\---\AppData\Local\Programs\Python\Python38-3...
Tonsil asked 12/6, 2020 at 8:15

3

Solved

I have quite a large bot for Discord written up. It has over 1000 lines of code. When I researched how to do it on Youtube and here, nothing seems to be working. I was wondering if someone could ex...
Uncalledfor asked 28/11, 2018 at 21:12

2

So I chose to implement logging in my discord.py bot which is fine and dandy and works alright. but once I add logging to files, be it through using a filehandler handler = logging.FileHandler( fi...
Mosesmosey asked 4/11, 2020 at 11:24

3

I have created some commands which can only be used by specific users. I do not want those commands to show in the drop-down list of the slash commands for everyone. How to hide those commands? I a...
Famine asked 13/8, 2022 at 5:33

3

I'm working on a discord bot and trying to solve this. I want to know how could I use await in non async function or if I can await a function in the lambda line the last line in the code. I have t...
Disinterest asked 5/3, 2021 at 11:51

© 2022 - 2024 — McMap. All rights reserved.