discord.py – How do i move a users suggestion to another channel?

me once again for the 7th time. I’m making a suggestion command. When someone sends their suggestion, it should go to another channel. I have a log channel ID set ( log_channel_id ), the suggestion should go to that channel. Code: class View(discord.ui.View): def __init__(self): super().__init__() @discord.ui.button(label=’Confirm’, style=discord.ButtonStyle.green) async def asdf(self, interaction: discord.Interaction, button: discord.ui.Button):… Read More discord.py – How do i move a users suggestion to another channel?

discord.py – How can i make a slash command's response only visible to me?

small question. How can i make a slash command only visible to me? photo:example Literally searched the internet for 10 minutes and found NO answer. The only thing i found was how to make a slash command. Does anyone know how to do this? thanks. >Solution : @bot.tree.command(name="something") async def something(interaction:discord.Interaction): await interaction.response.send_message("NOTHING",ephemeral=True) # optional… Read More discord.py – How can i make a slash command's response only visible to me?

discord.py – How to make a response when a user doesn't have perms to ban a user

im trying to make it that when you try to ban a user, but you dont have perms, it sends a message instead of just an error. Anyone have a fix? @bot.tree.command(name=’ban’, description=’Ban a user. (w/ perms only)’) @commands.has_permissions(ban_members = True) async def ban(ctx,member : discord.Member,* , reason: str): """Ban a user""" await ctx.response.send_message(member.name +… Read More discord.py – How to make a response when a user doesn't have perms to ban a user

Is there a way to create a oauth2 discord link that will automatically add somebody to the server?

Is there a way to create a oauth2 discord link that will automatically add somebody to a server ? Right now I’m just using normal link for authorization https://discord.com/api/oauth2/authorize? >Solution : To add a user to a server automatically, you’ll need to use a bot that has already been added to the server and has… Read More Is there a way to create a oauth2 discord link that will automatically add somebody to the server?

Unban command in discord.py is not working

async def openinf(): with open("infractions.json", "r") as f: users = json.load(f) return users async def createinfraction(user, type, mod, date, caseid, reason, expireson = None): infractions = await openinf() infractions[str(caseid)] = {} infractions[str(caseid)]["type"] = str(type) infractions[str(caseid)]["mod"] = str(mod.id) infractions[str(caseid)]["date"] = str(date) infractions[str(caseid)]["user"] = str(user.id) infractions[str(caseid)]["reason"] = str(reason) infractions[str(caseid)]["avatar"] = str(user.avatar) infractions[str(caseid)]["expireson"] = str(expireson) infractions[str(caseid)]["status"] = "Active"… Read More Unban command in discord.py is not working

Discord.py: How do I get the User_ID of a "Bot" object?

I am trying to make a discord bot using discord.py 2.0.0. I want to make a slash command that returns the user id of a Bot object, below is a simplified version of my code: import discord from discord.ext.commands import Bot intents = discord.Intents.all() client = Bot(command_prefix=’?’, intents=intents) tree = client.tree @tree.command(name="help", description="Help command") async… Read More Discord.py: How do I get the User_ID of a "Bot" object?