Set Case Insensitive to True

pull/8/head
sgoudham 4 years ago
parent 7f34e08898
commit c68b414ebd

@ -166,7 +166,7 @@ class Anime(Cog):
"""Printing out that Cog is ready on startup""" """Printing out that Cog is ready on startup"""
print(f"{self.__class__.__name__} Cog has been loaded!\n-----") print(f"{self.__class__.__name__} Cog has been loaded!\n-----")
@group(name="waifu", invoke_without_command=True, aliases=["Waifu"]) @group(name="waifu", invoke_without_command=True)
@bot_has_permissions(embed_links=True, add_reactions=True) @bot_has_permissions(embed_links=True, add_reactions=True)
async def waifu(self, ctx, *, waifu2: Optional[str] = None): async def waifu(self, ctx, *, waifu2: Optional[str] = None):
""" """
@ -241,7 +241,7 @@ class Anime(Cog):
await ctx.send(embed=single_waifu_generator(waifu)) await ctx.send(embed=single_waifu_generator(waifu))
@waifu.command(name="daily", aliases=["Daily"]) @waifu.command(name="daily")
async def daily_waifu(self, ctx): async def daily_waifu(self, ctx):
"""Returns the daily Waifu from MyWaifuList""" """Returns the daily Waifu from MyWaifuList"""

@ -114,7 +114,7 @@ class Enso(Cog):
"""Printing out that Cog is ready on startup""" """Printing out that Cog is ready on startup"""
print(f"{self.__class__.__name__} Cog has been loaded\n-----") print(f"{self.__class__.__name__} Cog has been loaded\n-----")
@commands.group(invoke_without_command=True) @commands.group(invoke_without_command=True, case_insensitive=True)
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
async def enso(self, ctx, name: Optional[str] = None): async def enso(self, ctx, name: Optional[str] = None):
"""Shows Random Person from Ensō""" """Shows Random Person from Ensō"""
@ -184,7 +184,7 @@ class Enso(Cog):
await ctx.send(f"Try the names listed below!" await ctx.send(f"Try the names listed below!"
f"\n{nice}") f"\n{nice}")
@command(name="rules", aliases=["Rules"]) @command(name="rules")
@cooldown(1, 5, BucketType.user) @cooldown(1, 5, BucketType.user)
async def rules(self, ctx): async def rules(self, ctx):
"""Ruleset for Ensō""" """Ruleset for Ensō"""
@ -279,7 +279,7 @@ class Enso(Cog):
# Delete the message # Delete the message
await message.delete() await message.delete()
@command(name="roles", aliases=["Roles"]) @command(name="roles")
@cooldown(1, 5, BucketType.user) @cooldown(1, 5, BucketType.user)
async def roles(self, ctx): async def roles(self, ctx):
"""Leveled role/xp system for Ensō""" """Leveled role/xp system for Ensō"""

@ -92,7 +92,7 @@ class Fun(Cog):
"""Printing out that Cog is ready on startup""" """Printing out that Cog is ready on startup"""
print(f"{self.__class__.__name__} Cog has been loaded\n-----") print(f"{self.__class__.__name__} Cog has been loaded\n-----")
@command(name="attack", aliases=['Attack'], hidden=True) @command(name="attack", hidden=True)
@is_owner() @is_owner()
async def attack(self, ctx, member: Member): async def attack(self, ctx, member: Member):
"""Throw Insults at Members""" """Throw Insults at Members"""
@ -132,7 +132,7 @@ class Fun(Cog):
# Sending out a random insult from the array "responses" # Sending out a random insult from the array "responses"
await ctx.send(random.choice(responses)) await ctx.send(random.choice(responses))
@command(name="comp", aliases=['Comp', 'Compliment']) @command(name="comp")
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def compliment(self, ctx, member: Member): async def compliment(self, ctx, member: Member):
"""Give Compliments to Members""" """Give Compliments to Members"""
@ -181,7 +181,7 @@ class Fun(Cog):
# Sending out a random compliment from the array "responses" # Sending out a random compliment from the array "responses"
await ctx.send(random.choice(responses)) await ctx.send(random.choice(responses))
@command(name="flip", aliases=['Flip']) @command(name="flip")
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def flip(self, ctx): async def flip(self, ctx):
"""Flip a Coin (Huge pp/Smol pp)""" """Flip a Coin (Huge pp/Smol pp)"""
@ -192,7 +192,7 @@ class Fun(Cog):
# Send out one of the responses stored in the array # Send out one of the responses stored in the array
await ctx.send(f"{ctx.author.mention} {random.choice(pp_array)}") await ctx.send(f"{ctx.author.mention} {random.choice(pp_array)}")
@command(name="dm", aliases=["DM", "dM"]) @command(name="dm")
@is_owner() @is_owner()
@has_permissions(administrator=True) @has_permissions(administrator=True)
async def dm(self, ctx, member: Member, *, text): async def dm(self, ctx, member: Member, *, text):
@ -203,7 +203,7 @@ class Fun(Cog):
# Delete the message sent instantly # Delete the message sent instantly
await ctx.message.delete() await ctx.message.delete()
@command(name="digby", aliases=["Digby"], hidden=True) @command(name="digby", hidden=True)
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
async def digby(self, ctx): async def digby(self, ctx):
@ -236,7 +236,7 @@ class Fun(Cog):
except FileNotFoundError as e: except FileNotFoundError as e:
print(e) print(e)
@command(name="doggo", aliases=["Doggo"]) @command(name="doggo")
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def doggo(self, ctx, breed: Optional[str] = None): async def doggo(self, ctx, breed: Optional[str] = None):
@ -332,7 +332,7 @@ class Fun(Cog):
await ctx.send( await ctx.send(
f"Doggo Not Found! Please do **{ctx.prefix}doggo breeds** to see the full list of Doggos!") f"Doggo Not Found! Please do **{ctx.prefix}doggo breeds** to see the full list of Doggos!")
@command(name="8ball", aliases=['8Ball']) @command(name="8ball")
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def _8ball(self, ctx, *, question): async def _8ball(self, ctx, *, question):
"""8ball Responses!""" """8ball Responses!"""
@ -357,7 +357,7 @@ class Fun(Cog):
except commands.BadArgument as e: except commands.BadArgument as e:
raise e raise e
@command(name="homies", aliases=["Homies", "homie", "Homie"]) @command(name="homies")
@cooldown(1, 10, BucketType.user) @cooldown(1, 10, BucketType.user)
@bot_has_permissions(attach_files=True) @bot_has_permissions(attach_files=True)
async def homies(self, ctx, *, text): async def homies(self, ctx, *, text):
@ -382,7 +382,7 @@ class Fun(Cog):
# Send the bytes object as an image file # Send the bytes object as an image file
await ctx.send(file=discord.File(file, "homies.png")) await ctx.send(file=discord.File(file, "homies.png"))
@command(name="owo", aliases=["Owo", "OwO"]) @command(name="owo")
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
@bot_has_permissions(manage_messages=True) @bot_has_permissions(manage_messages=True)
async def owo(self, ctx, *, text): async def owo(self, ctx, *, text):
@ -398,7 +398,7 @@ class Fun(Cog):
# Send the text back # Send the text back
await ctx.message.channel.send(owo) await ctx.message.channel.send(owo)
@command(name="text", aliases=["Text"]) @command(name="text")
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def image_to_text(self, ctx): async def image_to_text(self, ctx):
"""Display text from an image submitted""" """Display text from an image submitted"""

@ -161,7 +161,7 @@ class Guild(Cog):
"""Printing out that Cog is ready on startup""" """Printing out that Cog is ready on startup"""
print(f"{self.__class__.__name__} Cog has been loaded\n-----") print(f"{self.__class__.__name__} Cog has been loaded\n-----")
@group(name="rolepersist", invoke_without_command=True, usage="`[argument...]`") @group(name="rolepersist", invoke_without_command=True, case_insensitive=True, usage="`[argument...]`")
@has_permissions(manage_guild=True) @has_permissions(manage_guild=True)
@bot_has_permissions(administrator=True) @bot_has_permissions(administrator=True)
async def roles_persist(self, ctx): async def roles_persist(self, ctx):
@ -207,7 +207,7 @@ class Guild(Cog):
else: else:
await generate_embed(ctx, desc=f"**Role Persist is already disabled within {ctx.guild}!**") await generate_embed(ctx, desc=f"**Role Persist is already disabled within {ctx.guild}!**")
@group(name="modlogs", invoke_without_command=True, usage="`[argument...]`") @group(name="modlogs", invoke_without_command=True, case_insensitive=True, usage="`[argument...]`")
@has_permissions(manage_guild=True) @has_permissions(manage_guild=True)
@bot_has_permissions(administrator=True) @bot_has_permissions(administrator=True)
async def modlogs(self, ctx): async def modlogs(self, ctx):
@ -358,7 +358,7 @@ class Guild(Cog):
# Sending confirmation message that the modmail system has been deleted # Sending confirmation message that the modmail system has been deleted
await ctx.send() await ctx.send()
@group(invoke_without_command=True, usage="`[argument...]`") @group(name="modmail", invoke_without_command=True, case_insensitive=True, usage="`[argument...]`")
@bot_has_permissions(administrator=True) @bot_has_permissions(administrator=True)
async def modmail(self, ctx): async def modmail(self, ctx):
""" """

@ -629,7 +629,7 @@ class Help(Cog):
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
@command(name='help', aliases=["Help"], usage="`[command|cog]`") @command(name='help', usage="`[command|cog]`")
async def _help(self, ctx, *, cmd: Optional[str] = None): async def _help(self, ctx, *, cmd: Optional[str] = None):
"""Shows help about a command or the bot""" """Shows help about a command or the bot"""
@ -651,7 +651,7 @@ class Help(Cog):
except Exception as ex: except Exception as ex:
await ctx.send(f"**{ex}**") await ctx.send(f"**{ex}**")
@command(name="prefix", aliases=["Prefix"]) @command(name="prefix")
@guild_only() @guild_only()
@has_permissions(manage_guild=True) @has_permissions(manage_guild=True)
async def change_prefix(self, ctx, new: Optional[str] = None): async def change_prefix(self, ctx, new: Optional[str] = None):
@ -671,7 +671,7 @@ class Help(Cog):
# Grab the current prefix for the guild within the cached dictionary # Grab the current prefix for the guild within the cached dictionary
await ctx.send(f"**The current guild prefix is `{get_prefix_for_guild(str(ctx.guild.id))}`**") await ctx.send(f"**The current guild prefix is `{get_prefix_for_guild(str(ctx.guild.id))}`**")
@command(name="support", aliases=["Support"]) @command(name="support")
async def support(self, ctx): async def support(self, ctx):
"""Joining Support Server And Sending Feedback""" """Joining Support Server And Sending Feedback"""
@ -699,7 +699,7 @@ class Help(Cog):
await ctx.send(embed=embed) await ctx.send(embed=embed)
@command(name="feedback", aliases=["Feedback"]) @command(name="feedback")
async def feedback(self, ctx): async def feedback(self, ctx):
"""Sending Feedback to Support Server""" """Sending Feedback to Support Server"""

@ -146,7 +146,7 @@ class Info(Cog):
"""Printing out that Cog is ready on startup""" """Printing out that Cog is ready on startup"""
print(f"{self.__class__.__name__} Cog has been loaded\n-----") print(f"{self.__class__.__name__} Cog has been loaded\n-----")
@command(name="userinfo", aliases=["ui"]) @command(name="userinfo")
@cooldown(1, 5, BucketType.user) @cooldown(1, 5, BucketType.user)
@guild_only() @guild_only()
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
@ -352,7 +352,7 @@ class Info(Cog):
await ctx.send(embed=embed) await ctx.send(embed=embed)
@command(name="about", aliases=["About"]) @command(name="about")
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
async def checking_bot_stats(self, ctx): async def checking_bot_stats(self, ctx):
"""Bot Statistics! (CPU/Mem Usage etc)""" """Bot Statistics! (CPU/Mem Usage etc)"""
@ -415,7 +415,7 @@ class Info(Cog):
await ctx.send(embed=stats) await ctx.send(embed=stats)
@command(name="avatar", aliases=["Avatar"]) @command(name="avatar")
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
async def get_user_avatar(self, ctx, member: Optional[Member] = None): async def get_user_avatar(self, ctx, member: Optional[Member] = None):
""" """

@ -45,7 +45,7 @@ class Interactive(Cog):
"""Printing out that Cog is ready on startup""" """Printing out that Cog is ready on startup"""
print(f"{self.__class__.__name__} Cog has been loaded\n-----") print(f"{self.__class__.__name__} Cog has been loaded\n-----")
@command(name="kiss", aliases=["Kiss"]) @command(name="kiss")
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
@cooldown(1, 3, BucketType.user) @cooldown(1, 3, BucketType.user)
async def kiss(self, ctx, member: Member): async def kiss(self, ctx, member: Member):
@ -114,7 +114,7 @@ class Interactive(Cog):
except FileNotFoundError as e: except FileNotFoundError as e:
print(e) print(e)
@command(name="cuddle", aliases=["Cuddle"]) @command(name="cuddle")
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
@cooldown(1, 3, BucketType.user) @cooldown(1, 3, BucketType.user)
async def cuddle(self, ctx, member: Member): async def cuddle(self, ctx, member: Member):
@ -183,7 +183,7 @@ class Interactive(Cog):
except FileNotFoundError as e: except FileNotFoundError as e:
print(e) print(e)
@command(name="kill", aliases=["Kill"]) @command(name="kill")
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
@cooldown(1, 3, BucketType.user) @cooldown(1, 3, BucketType.user)
async def kill(self, ctx, member: Member): async def kill(self, ctx, member: Member):
@ -219,7 +219,7 @@ class Interactive(Cog):
except FileNotFoundError as e: except FileNotFoundError as e:
print(e) print(e)
@command(name="slap", aliases=["Slap"]) @command(name="slap")
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
@cooldown(1, 3, BucketType.user) @cooldown(1, 3, BucketType.user)
async def slap(self, ctx, member: Member): async def slap(self, ctx, member: Member):
@ -255,7 +255,7 @@ class Interactive(Cog):
except FileNotFoundError as e: except FileNotFoundError as e:
print(e) print(e)
@command(name="pat", aliases=["Pat"]) @command(name="pat")
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
@cooldown(1, 3, BucketType.user) @cooldown(1, 3, BucketType.user)
async def pat(self, ctx, member: Member): async def pat(self, ctx, member: Member):
@ -291,7 +291,7 @@ class Interactive(Cog):
except FileNotFoundError as e: except FileNotFoundError as e:
print(e) print(e)
@command(name="lemon", aliases=["Lemon"]) @command(name="lemon")
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
@cooldown(1, 3, BucketType.user) @cooldown(1, 3, BucketType.user)
async def lemon(self, ctx, member: Member): async def lemon(self, ctx, member: Member):
@ -326,7 +326,7 @@ class Interactive(Cog):
except FileNotFoundError as e: except FileNotFoundError as e:
print(e) print(e)
@command(name="choke", aliases=["Choke"]) @command(name="choke")
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
@cooldown(1, 3, BucketType.user) @cooldown(1, 3, BucketType.user)
async def choke(self, ctx, member: Member): async def choke(self, ctx, member: Member):
@ -361,7 +361,7 @@ class Interactive(Cog):
except FileNotFoundError as e: except FileNotFoundError as e:
print(e) print(e)
@command(name="hug", aliases=["Hug"]) @command(name="hug")
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
@cooldown(1, 3, BucketType.user) @cooldown(1, 3, BucketType.user)
async def hug(self, ctx, member: Member): async def hug(self, ctx, member: Member):

@ -264,7 +264,7 @@ class Moderation(Cog):
async def on_ready(self): async def on_ready(self):
print(f"{self.__class__.__name__} Cog has been loaded\n-----") print(f"{self.__class__.__name__} Cog has been loaded\n-----")
@command(name="kick", aliases=["Kick"], usage="`<member>...` `[reason]`") @command(name="kick", usage="`<member>...` `[reason]`")
@guild_only() @guild_only()
@has_guild_permissions(kick_members=True) @has_guild_permissions(kick_members=True)
@bot_has_guild_permissions(kick_members=True) @bot_has_guild_permissions(kick_members=True)
@ -280,7 +280,7 @@ class Moderation(Cog):
# Send embed of the kicked member # Send embed of the kicked member
await kick_members(ctx.message, members, reason) await kick_members(ctx.message, members, reason)
@command(name="mute", aliases=["Mute"], usage="`<member>...` `[reason]`") @command(name="mute", usage="`<member>...` `[reason]`")
@has_guild_permissions(manage_roles=True) @has_guild_permissions(manage_roles=True)
@bot_has_guild_permissions(manage_roles=True) @bot_has_guild_permissions(manage_roles=True)
async def mute(self, ctx, members: Greedy[Member], *, reason: Optional[str] = "No Reason Given"): async def mute(self, ctx, members: Greedy[Member], *, reason: Optional[str] = "No Reason Given"):
@ -327,7 +327,7 @@ class Moderation(Cog):
await mute_members(self.bot.db, ctx, members, reason, role) await mute_members(self.bot.db, ctx, members, reason, role)
@command(name="unmute", aliases=["Unmute"], usage="`<member>...` `[reason]`") @command(name="unmute", usage="`<member>...` `[reason]`")
@has_guild_permissions(manage_roles=True) @has_guild_permissions(manage_roles=True)
@bot_has_guild_permissions(manage_roles=True) @bot_has_guild_permissions(manage_roles=True)
async def unmute(self, ctx, members: Greedy[Member], *, reason: Optional[str] = "No Reason Given"): async def unmute(self, ctx, members: Greedy[Member], *, reason: Optional[str] = "No Reason Given"):
@ -358,7 +358,7 @@ class Moderation(Cog):
colour=enso_embedmod_colours) colour=enso_embedmod_colours)
await ctx.send(embed=embed) await ctx.send(embed=embed)
@command(name="ban", aliases=["Ban"], usage="`<member>...` `[reason]`") @command(name="ban", usage="`<member>...` `[reason]`")
@guild_only() @guild_only()
@has_guild_permissions(ban_members=True) @has_guild_permissions(ban_members=True)
@bot_has_guild_permissions(ban_members=True) @bot_has_guild_permissions(ban_members=True)
@ -373,7 +373,7 @@ class Moderation(Cog):
with ctx.typing(): with ctx.typing():
await ban_members(ctx.message, members, reason) await ban_members(ctx.message, members, reason)
@command(name="unban", aliases=["Unban"], usage="`<member>...` `[reason]`") @command(name="unban", usage="`<member>...` `[reason]`")
@guild_only() @guild_only()
@has_guild_permissions(ban_members=True) @has_guild_permissions(ban_members=True)
@bot_has_guild_permissions(ban_members=True) @bot_has_guild_permissions(ban_members=True)
@ -387,7 +387,7 @@ class Moderation(Cog):
with ctx.typing(): with ctx.typing():
await unban_members(self, ctx.message, members, reason) await unban_members(self, ctx.message, members, reason)
@command(name="purge", aliases=["Purge"]) @command(name="purge")
@guild_only() @guild_only()
@has_guild_permissions(manage_messages=True) @has_guild_permissions(manage_messages=True)
@bot_has_guild_permissions(manage_messages=True, read_message_history=True) @bot_has_guild_permissions(manage_messages=True, read_message_history=True)

@ -68,7 +68,7 @@ class Relationship(Cog):
"""Printing out that Cog is ready on startup""" """Printing out that Cog is ready on startup"""
print(f"{self.__class__.__name__} Cog has been loaded\n-----") print(f"{self.__class__.__name__} Cog has been loaded\n-----")
@command(name="marry", aliases=["Marry"]) @command(name="marry")
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def marry(self, ctx, member: Member): async def marry(self, ctx, member: Member):
"""Wed your Lover!""" """Wed your Lover!"""
@ -166,7 +166,7 @@ class Relationship(Cog):
# Send out an error message if the user waited too long # Send out an error message if the user waited too long
await ctx.send("**(。T ω T。) {} waited too long**".format(member.mention)) await ctx.send("**(。T ω T。) {} waited too long**".format(member.mention))
@command(name="divorce", aliases=["Divorce"]) @command(name="divorce")
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def divorce(self, ctx, member: Member): async def divorce(self, ctx, member: Member):
"""Divorce your Partner!""" """Divorce your Partner!"""
@ -259,7 +259,7 @@ class Relationship(Cog):
# Send out an error message if the user waited too long # Send out an error message if the user waited too long
await ctx.send("**(。T ω T。) {} waited too long**".format(member.mention)) await ctx.send("**(。T ω T。) {} waited too long**".format(member.mention))
@command(name="marriageinfo", aliases=["minfo", "Minfo"]) @command(name="marriageinfo", aliases=["minfo"])
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
async def m_info(self, ctx, member: Member = None): async def m_info(self, ctx, member: Member = None):

@ -61,7 +61,8 @@ client = commands.Bot( # Create a new bot
command_prefix=get_prefix, # Set the prefix command_prefix=get_prefix, # Set the prefix
description='All current available commands within Ensō~Chan', # Set a description for the bot description='All current available commands within Ensō~Chan', # Set a description for the bot
owner_id=154840866496839680, # Your unique User ID owner_id=154840866496839680, # Your unique User ID
version=get_version) # Version number of Ensō~Chan version=get_version,
case_insensitive=True) # Version number of Ensō~Chan
client.remove_command("help") # Remove default help command client.remove_command("help") # Remove default help command
@ -175,14 +176,14 @@ async def on_ready():
print("UvU Senpaiii I'm weady") print("UvU Senpaiii I'm weady")
@client.command(name="ping", aliases=["Ping"]) @client.command(name="ping")
async def _ping(ctx): async def _ping(ctx):
"""Latency of the Bot (ms)""" """Latency of the Bot (ms)"""
await ctx.send(f"Pong! `{round(client.latency * 1000)}ms`") await ctx.send(f"Pong! `{round(client.latency * 1000)}ms`")
@client.command(name="leave", aliases=["Leave"], hidden=True) @client.command(name="leave", hidden=True)
@is_owner() @is_owner()
async def leave(ctx): async def leave(ctx):
"""Leaves the guild""" """Leaves the guild"""

Loading…
Cancel
Save