discord ext commands errors ExtensionFailed Extension cogs unban raised an error IndentationError expected an indented block unban py line 11

0 votes
import discord

from discord.ext import commands

from discord import User

class unban(commands.Cog):

    def __init__(self, bot):

        self.bot = bot

   

    @commands.command()

    @commands.has_permissions(ban_members=True)

    async def unban(ctx, *, member):

    banned_users = await ctx.guild.bans()

    member_name, member_discriminator = member.split('#')

    for ban_entry in banned_users:

        user = ban_entry.user

    if (user.name, user.discriminator) == (member_name, member_discriminator):

        await ctx.guild.unban(user)

        await ctx.send(f'Si {user.mention} Udah Gua UnBan')

        return

async def setup(bot):

    await bot.add_cog(unban(bot))
Dec 31, 2022 in Python by anonymous
• 100 points

edited 4 days ago 5 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP