fix: reverted previous commit

This commit is contained in:
Seaswimmer 2023-07-30 09:55:52 -04:00
parent 26115505ed
commit 24f52acf8c
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -11,8 +11,8 @@ class Galaxy(commands.Cog):
self.bot = bot self.bot = bot
self.config = Config.get_conf(self, identifier=6621962) self.config = Config.get_conf(self, identifier=6621962)
self.config.register_guild( self.config.register_guild(
fishtarget = 0, cocotarget = 0,
fish = "🐟" cocoemoji = 1028535684757209118
) )
@commands.command(aliases=["pxc", "pc", "polarisconvert", "tatsutopolaris", "ttp"]) @commands.command(aliases=["pxc", "pc", "polarisconvert", "tatsutopolaris", "ttp"])
@ -68,41 +68,41 @@ class Galaxy(commands.Cog):
@commands.group(autohelp=False, invoke_without_command=True) @commands.group(autohelp=False, invoke_without_command=True)
@commands.guild_only() @commands.guild_only()
async def fish(self, ctx): async def coco(self, ctx):
"""Checks who Fish is currently set to.""" """Checks who Coco is currently set to."""
emoji = self.bot.get_emoji(await self.config.guild(ctx.guild).cocoemoji()) emoji = self.bot.get_emoji(await self.config.guild(ctx.guild).cocoemoji())
cocotarget = await self.config.guild(ctx.guild).cocotarget() cocotarget = await self.config.guild(ctx.guild).cocotarget()
embed = discord.Embed(color=await self.bot.get_embed_color(None), description=f"Coco is currently set to <@{cocotarget}> ({cocotarget}).\nCoco's emoji is currently set to {emoji} ({await self.config.guild(ctx.guild).cocoemoji()}).") embed = discord.Embed(color=await self.bot.get_embed_color(None), description=f"Coco is currently set to <@{cocotarget}> ({cocotarget}).\nCoco's emoji is currently set to {emoji} ({await self.config.guild(ctx.guild).cocoemoji()}).")
await ctx.send(embed=embed) await ctx.send(embed=embed)
@fish.command(name="emoji") @coco.command(name="emoji")
async def fish_emoji(self, ctx, emoji: discord.Emoji = None): async def coco_emoji(self, ctx, emoji: discord.Emoji = None):
"""Sets Fish's emoji.""" """Sets Coco's emoji."""
if emoji: if emoji:
await self.config.guild(ctx.guild).fishemoji.set(emoji) await self.config.guild(ctx.guild).cocoemoji.set(emoji.id)
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Fish's emoji has been set to {emoji}.") embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Coco's emoji has been set to {emoji} ({emoji.id}).")
await ctx.send(embed=embed) await ctx.send(embed=embed)
else: else:
await self.config.guild(ctx.guild).cocoemoji.set('🐟') await self.config.guild(ctx.guild).cocoemoji.set(1028535684757209118)
emoji = self.bot.get_emoji('🐟') emoji = self.bot.get_emoji(1028535684757209118)
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Fish's emoji has been set to {emoji}.") embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Coco's emoji has been set to {emoji} (1028535684757209118).")
await ctx.send(embed=embed) await ctx.send(embed=embed)
@fish.command(name="set") @coco.command(name="set")
async def fish_set(self, ctx, member: discord.Member): async def coco_set(self, ctx, member: discord.Member):
"""Sets Fish's target.""" """Sets Coco's target."""
if member: if member:
await self.config.guild(ctx.guild).fishtarget.set(member.id) await self.config.guild(ctx.guild).cocotarget.set(member.id)
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Fish has been set to {member.mention} ({member.id}).") embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Coco has been set to {member.mention} ({member.id}).")
await ctx.send(embed=embed) await ctx.send(embed=embed)
else: else:
await ctx.send(content="That is not a valid argument!") await ctx.send(content="That is not a valid argument!")
@fish.command(name="reset") @coco.command(name="reset")
async def fish_reset(self, ctx): async def coco_reset(self, ctx):
"""Resets Fish's target.""" """Resets Coco's target."""
await self.config.guild(ctx.guild).fishtarget.set(0) await self.config.guild(ctx.guild).cocotarget.set(0)
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Fish has been reset.") embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Coco has been reset.")
await ctx.send(embed=embed) await ctx.send(embed=embed)
@commands.command() @commands.command()