Esempio n. 1
0
    async def unban(self, ctx, members: commands.Greedy[discord.Member], hatban: commands.Greedy[int], *, reason=None):
        if global_functions.checkmodrole(ctx) is True:
            #bans based on id in text
            for offending_user in hatban:
                if reason is None:
                    await ctx.channel.send("You forgot a reason to unban")
                    break
                else:
                    self.mod_banner=ctx.author
                    self.mod_reason=reason
                    await ctx.guild.unban(discord.Object(id=offending_user))
                    print("hat-unban pass")

            #bans based on a ping
            for offending_user in members:
                if reason is None:
                    await ctx.channel.send("You forgot a reason to unban")
                    break
                else:
                    self.mod_banner=ctx.author
                    self.mod_reason=reason
                    await ctx.guild.unban(discord.Object(id=offending_user.id))
                    print("ping-unban pass")
        else:
            await ctx.channel.send("You do not have permission.")
Esempio n. 2
0
 async def verify(self, ctx, members: commands.Greedy[discord.Member]):
     if global_functions.checkmodrole(ctx) is True:
         restricted_role = discord.utils.get(ctx.guild.roles,
                                             id=config.PERG_ROLE_ID)
         for going_to_be_verified in members:
             if restricted_role in going_to_be_verified.roles:
                 await going_to_be_verified.remove_roles(restricted_role)
                 print("removed")
             else:
                 print(going_to_be_verified.name + " is not restricted")
     else:
         await ctx.channel.send("You have no perms")
Esempio n. 3
0
    async def print_out(self,ctx):
        if global_functions.checkmodrole(ctx) is True:
            print("is admin")
            conn=sqlite3.connect(os.getcwd()+'\\faucet_info.db')
            cursor=conn.cursor()

            print("getting data")
            all_data=cursor.execute("SELECT * FROM FAUCET_ADDRESSES")

            for data in all_data:
                print(data)

            cursor.close()
            conn.close()
        else:
            print(ctx.author.name+" tried to print out a faucet table")
Esempio n. 4
0
    async def print_out_levels(self, ctx):
        if global_functions.checkmodrole(ctx) is True:
            print("is admin")
            conn = sqlite3.connect(os.getcwd() + '\\rank_recording.db')
            cursor = conn.cursor()

            print("getting data")
            all_data = cursor.execute("SELECT * FROM LEVELS")

            for data in all_data:
                print(data)

            cursor.close()
            conn.close()
        else:
            print(ctx.author.name + " tried to print out a level table")