discord

How to make a NSFW command in discord.py?

℡╲_俬逩灬. 提交于 2021-01-07 02:27:46
问题 I am making a discord bot and I want a NSFW command in, so I used a command that's puts a random image of a NSFW subreddit, but I need help with the detection of a NSFW channel, so this command can't be used in channels that are not nsfw, and also send a message that says "You need to use this command in a nsfw channel!" Here's my command, but there's a error in the part of "else:" async def nsfw(ctx): if ctx.channel.is_nsfw(): embed = discord.Embed(title="test", description="test") async

Discord.py how do I make a mute command?

孤者浪人 提交于 2021-01-06 07:52:56
问题 As the title says. I'm trying to figure out how to make a mute command using discord.py rewrite. I'm thinking that we need to have a "mute" role where the command used gives the user the "mute" role and for how long. How do I achieve this. I already have @bot.command() @commands.has_permissions(mute_members) async def mute(ctx, member:discord.Member): 回答1: The best way to do this would be to have a database setup in which you can add and remove users. Then you can use the on_message event and

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)

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

On message delete message Discord.py

我是研究僧i 提交于 2021-01-04 06:23:33
问题 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

On message delete message Discord.py

纵饮孤独 提交于 2021-01-04 06:22:17
问题 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

How to make a invites command (Discord.js)

六月ゝ 毕业季﹏ 提交于 2021-01-01 13:33:08
问题 Hello, I am currently wondering how to make a invites command for my discord bot. How it would work will be I use n!invites and it comes with You have (num) invites. I would like it to be the amount of invites the user has gained. If I could get some help here that would be appreciated. Thanks. Note I have looked at the the discord.js website and there is a place for it but I never understood. 回答1: I believe the command you're looking for would look something like this: if (message.content ==

How to make a invites command (Discord.js)

无人久伴 提交于 2021-01-01 13:30:01
问题 Hello, I am currently wondering how to make a invites command for my discord bot. How it would work will be I use n!invites and it comes with You have (num) invites. I would like it to be the amount of invites the user has gained. If I could get some help here that would be appreciated. Thanks. Note I have looked at the the discord.js website and there is a place for it but I never understood. 回答1: I believe the command you're looking for would look something like this: if (message.content ==

How to make a invites command (Discord.js)

荒凉一梦 提交于 2021-01-01 13:28:56
问题 Hello, I am currently wondering how to make a invites command for my discord bot. How it would work will be I use n!invites and it comes with You have (num) invites. I would like it to be the amount of invites the user has gained. If I could get some help here that would be appreciated. Thanks. Note I have looked at the the discord.js website and there is a place for it but I never understood. 回答1: I believe the command you're looking for would look something like this: if (message.content ==