How Do I Make My Command Only Ban The User In One Guild
@commands.command(aliases=['hban']) @commands.has_permissions(manage_messages=True) @commands.cooldown(1,5,BucketType.user) async def hackban(self, ctx, usid:int): fo
Solution 1:
Simply remove the for-loop and use ctx.guild
as the guild
@commands.command(aliases=['hban'])
@commands.has_permissions(manage_messages=True)
@commands.cooldown(1,5,BucketType.user)
async def hackban(self, ctx, usid:int):
await ctx.guild.ban(discord.Object(id=usid))
embed = discord.Embed(title="<:Checkmark:837279790682734593> "+f"Successfully hack banned {usid}", color=discord.Color.dark_purple())
await ctx.send(embed=embed)
Post a Comment for "How Do I Make My Command Only Ban The User In One Guild"