discord.py-rewrite

Discord.py - bot sending information about message instead of message

血红的双手。 提交于 2020-08-09 08:11:11
问题 I am trying to make a system where when you react to an emoji, it will send that message (depending on what emoji you reacted with) - to another text-channel, now it is returning this instead of the actual message: <Message id=733788372891467838 channel=<TextChannel id=733721953134837861 name='admin-bug' position=1 nsfw=False news=False category_id=733717942604398684> type=<MessageType.default: 0> author=<Member id=733720584831369236 name='ReefCraft' discriminator='3102' bot=True nick=None

Discord.py - Make a bot react to its own message(s)

感情迁移 提交于 2020-07-28 04:44:26
问题 I am trying to make my discord bot react to its own message, pretty much. The system works like this: A person uses the command !!bug - And gets a message in DM', she/she is supposed to answer those questions. And then whatever he/she answered, it will be transferred an embedded message to an admin text-channel. But I need to add 3 emojis, or react with three different emojis. And depending on what the admin chooses, it will transfer the message once more. So if an admin reacts to an emoji

How does a discord bot handle events from multiple servers

好久不见. 提交于 2020-07-10 09:34:29
问题 I'm developing a discord bot using discord.py (rewrite branch) for my servers and I need to invite the bot to multiple servers and use it simultaneously. My question is: Do I need to set up a new thread for every server or does the bot queue events and handle them one by one? if it does queue them, should I just use that or use separate threads? Sorry if this is a noobish question but I'm fairly new to discord.py and I don't really understand how it works just yet. Thanks for reading 回答1: No,

Issue when running some commands from within cogs discord.py

北城余情 提交于 2020-06-29 03:59:07
问题 Ok so I'm having an issue running a couple commands from inside cogs. One command won't run regardless of what I put it into and the other simply won't run from within the cog. The commands are set prefix and my message counter. [the message counter is actually a listener not a command but has the same issue]. The error they keep throwing is basically this: Traceback (most recent call last): File "C:\Users\Joshu\PycharmProjects\Discord_Bots\Ranma\venv\lib\site-packages\discord\client.py",

How to setup ffmpeg for discord.py on windows 10

非 Y 不嫁゛ 提交于 2020-06-28 04:02:56
问题 I'm creating a discord.py bot that will play music and I'm having trouble using FFMPEG. The FFMPEG download is in my project folders but its still saying that it cant be found. The problem is probably that I havent added it to PATH but I dont know how to do that so if anyone could help me get it working that would be brilliant! 回答1: To add FFMPEG to path, you're going to want to: Copy the path to \bin in the folder that FFMPEG was downloaded to. Open the start menu and search for "Edit

How to setup ffmpeg for discord.py on windows 10

谁说我不能喝 提交于 2020-06-28 04:02:00
问题 I'm creating a discord.py bot that will play music and I'm having trouble using FFMPEG. The FFMPEG download is in my project folders but its still saying that it cant be found. The problem is probably that I havent added it to PATH but I dont know how to do that so if anyone could help me get it working that would be brilliant! 回答1: To add FFMPEG to path, you're going to want to: Copy the path to \bin in the folder that FFMPEG was downloaded to. Open the start menu and search for "Edit

Playing music with a bot from Youtube without downloading the file

≡放荡痞女 提交于 2020-06-26 05:56:58
问题 How would i go about playing music using a discord bot from Youtube without downloading the song as a file? I've already had a look at the included music bot in the discord.py documentation but that one downloads a file to the directory. Is there any way to avoid this? Code from the documentation example: ytdl_format_options = { 'format': 'bestaudio/best', 'outtmpl': '%(extractor)s-%(id)s-%(title)s.%(ext)s', 'restrictfilenames': True, 'noplaylist': True, 'nocheckcertificate': True,

Discord bot commands not working on reaction roles (Discord PY)

妖精的绣舞 提交于 2020-06-23 14:02:06
问题 When i go to execute my script it shows me this error. Not sure what it is but please help me! Error shown This was the error shown when i ran my bot. I have no clue but i was trying to set up reaction roles and this popped up @bot.event() TypeError: event() missing 1 required positional argument: 'coro' Part of script with error This is the part of the script the error directing me to telling me it was there! @bot.event() async def on_raw_reaction_add(payload): message_id = payload.message

How do I stop “ValueError: tortoise.backends.sqlite.client.SqliteClient object was created in a different Context”?

你离开我真会死。 提交于 2020-06-17 09:29:24
问题 I'm writing a discord bot and using tortoise orm to store data. I need to use transactions, but I continually get the following error: Full type of the error is <class 'discord.ext.commands.errors.CommandInvokeError'> Command raised an exception: ValueError: <Token var=<ContextVar name='default' default=<tortoise.backends.sqlite.client.SqliteClient object at 0x7f52ef5080d0> at 0x7f52ef362630> at 0x7f52dd636c80> was created in a different Context - [x] Traceback (most recent call last): - [x]

How to define objects in discord.py rewrite

点点圈 提交于 2020-06-17 00:50:49
问题 As stated in the title, how? I'm really struggling with understanding the documentation as there are no examples of anything. How do I define something like a VoiceState, Member, VoiceChannel, etc... Running on tutorials is fine until you have to start consulting the documentation for something specific, at which point it becomes really frustrating when you have no idea how to define objects or use certain commands... 回答1: A lot of this will come from experience, so don't be discouraged if it