discord.py

Discord Python Rewrite - Move channel

夙愿已清 提交于 2021-01-06 03:29:00
问题 Is it possible to move a channel on discord.py? Im making a nuke command that clones and deletes the channel, and it worked, but now i need to find out how to move the channel up to the origonal place, if there's a code / docs, please tell me a example. Thank's Edit: I Got a working edit but it's always drags it on top, i need it so it will drag the channel to the same position before it got nuked. My code that i currently have @client.command() @commands.has_permissions(manage_channels=True)

Discord Python Rewrite - Move channel

时光总嘲笑我的痴心妄想 提交于 2021-01-06 03:26:55
问题 Is it possible to move a channel on discord.py? Im making a nuke command that clones and deletes the channel, and it worked, but now i need to find out how to move the channel up to the origonal place, if there's a code / docs, please tell me a example. Thank's Edit: I Got a working edit but it's always drags it on top, i need it so it will drag the channel to the same position before it got nuked. My code that i currently have @client.command() @commands.has_permissions(manage_channels=True)

How do you have a Discord bot remove a user reaction to a message in discord.py?

旧巷老猫 提交于 2021-01-05 09:15:47
问题 I'm using an @client.event and using async def on_raw_reaction_add(payload): to read Discord reaction events. I need to be able to delete a user reaction when they fail one of the flags in my code. I saw in the documentation that there is await remove(user) but I don't think I'm using it right. Any suggestions? 回答1: You can use either Message.remove_reaction or Reaction.remove. A Reaction object represents a specific emoji reaction to a Message, so if the Reaction object you have is not for

How do you have a Discord bot remove a user reaction to a message in discord.py?

被刻印的时光 ゝ 提交于 2021-01-05 09:14:05
问题 I'm using an @client.event and using async def on_raw_reaction_add(payload): to read Discord reaction events. I need to be able to delete a user reaction when they fail one of the flags in my code. I saw in the documentation that there is await remove(user) but I don't think I'm using it right. Any suggestions? 回答1: You can use either Message.remove_reaction or Reaction.remove. A Reaction object represents a specific emoji reaction to a Message, so if the Reaction object you have is not for

How to check if bot is connected to a channel? | discord.py

泄露秘密 提交于 2021-01-04 12:27:02
问题 I've decided to try making my discord bot play music, but I've gotten stuck already. Mainly due to the fact I can't find any sources to help with the current version, I've been winging everything from the docs. However, I can't figure out how to check if the bot is connected to a voice channel. I have tried if not Client.is_connected(): , however that didn't work. If there are any updated sources to help me get the basics of discord.py's voice features, please give me a link :) Here is my

How to check if bot is connected to a channel? | discord.py

给你一囗甜甜゛ 提交于 2021-01-04 12:26:33
问题 I've decided to try making my discord bot play music, but I've gotten stuck already. Mainly due to the fact I can't find any sources to help with the current version, I've been winging everything from the docs. However, I can't figure out how to check if the bot is connected to a voice channel. I have tried if not Client.is_connected(): , however that didn't work. If there are any updated sources to help me get the basics of discord.py's voice features, please give me a link :) Here is my

How to check if bot is connected to a channel? | discord.py

放肆的年华 提交于 2021-01-04 12:25:33
问题 I've decided to try making my discord bot play music, but I've gotten stuck already. Mainly due to the fact I can't find any sources to help with the current version, I've been winging everything from the docs. However, I can't figure out how to check if the bot is connected to a voice channel. I have tried if not Client.is_connected(): , however that didn't work. If there are any updated sources to help me get the basics of discord.py's voice features, please give me a link :) Here is my

How to check if bot is connected to a channel? | discord.py

吃可爱长大的小学妹 提交于 2021-01-04 12:25:25
问题 I've decided to try making my discord bot play music, but I've gotten stuck already. Mainly due to the fact I can't find any sources to help with the current version, I've been winging everything from the docs. However, I can't figure out how to check if the bot is connected to a voice channel. I have tried if not Client.is_connected(): , however that didn't work. If there are any updated sources to help me get the basics of discord.py's voice features, please give me a link :) Here is my

Discord.py Bot How to play audio from local files

拟墨画扇 提交于 2021-01-04 06:48:41
问题 Basically the title. I installed ffmpeg and discord.py[audio] already. I just need to learn how it works. couldn't find any tutorial for local audio files. and I cant understand anything from documentations :/ 回答1: That's a function that plays a local audio file. I had problems with FFmpeg, so I hardcoded the .exe path. Also, I had a problem with the file path to the local file, so I put the absolute path in. This function also deletes the command that called it after the audio is done

On message delete message Discord.py

删除回忆录丶 提交于 2021-01-04 06:29:18
问题 import discord import asyncio client = discord.Client() @client.event async def on_ready(): print ("I’m Now Online") @client.event async def on_message(message): if message.author == client.user: return elif message.content.startswith("deletethis"): I’m wonder how I could be able to add to this to delete the above command when the author of the message sends the command above. May someone help create one? I’ve tried my self by brain and didn’t find anything online so I’m looking for some help