feat: updated coco to work with unicode emojis
This commit is contained in:
parent
c0af5aca3a
commit
26115505ed
1 changed files with 22 additions and 22 deletions
|
@ -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(
|
||||||
cocotarget = 0,
|
fishtarget = 0,
|
||||||
cocoemoji = 1028535684757209118
|
fish = "🐟"
|
||||||
)
|
)
|
||||||
|
|
||||||
@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 coco(self, ctx):
|
async def fish(self, ctx):
|
||||||
"""Checks who Coco is currently set to."""
|
"""Checks who Fish 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)
|
||||||
|
|
||||||
@coco.command(name="emoji")
|
@fish.command(name="emoji")
|
||||||
async def coco_emoji(self, ctx, emoji: discord.Emoji = None):
|
async def fish_emoji(self, ctx, emoji: discord.Emoji = None):
|
||||||
"""Sets Coco's emoji."""
|
"""Sets Fish's emoji."""
|
||||||
if emoji:
|
if emoji:
|
||||||
await self.config.guild(ctx.guild).cocoemoji.set(emoji.id)
|
await self.config.guild(ctx.guild).fishemoji.set(emoji)
|
||||||
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Coco's emoji has been set to {emoji} ({emoji.id}).")
|
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Fish's emoji has been set to {emoji}.")
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
else:
|
else:
|
||||||
await self.config.guild(ctx.guild).cocoemoji.set(1028535684757209118)
|
await self.config.guild(ctx.guild).cocoemoji.set('🐟')
|
||||||
emoji = self.bot.get_emoji(1028535684757209118)
|
emoji = self.bot.get_emoji('🐟')
|
||||||
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Coco's emoji has been set to {emoji} (1028535684757209118).")
|
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Fish's emoji has been set to {emoji}.")
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
@coco.command(name="set")
|
@fish.command(name="set")
|
||||||
async def coco_set(self, ctx, member: discord.Member):
|
async def fish_set(self, ctx, member: discord.Member):
|
||||||
"""Sets Coco's target."""
|
"""Sets Fish's target."""
|
||||||
if member:
|
if member:
|
||||||
await self.config.guild(ctx.guild).cocotarget.set(member.id)
|
await self.config.guild(ctx.guild).fishtarget.set(member.id)
|
||||||
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Coco has been set to {member.mention} ({member.id}).")
|
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Fish 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!")
|
||||||
|
|
||||||
@coco.command(name="reset")
|
@fish.command(name="reset")
|
||||||
async def coco_reset(self, ctx):
|
async def fish_reset(self, ctx):
|
||||||
"""Resets Coco's target."""
|
"""Resets Fish's target."""
|
||||||
await self.config.guild(ctx.guild).cocotarget.set(0)
|
await self.config.guild(ctx.guild).fishtarget.set(0)
|
||||||
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Coco has been reset.")
|
embed=discord.Embed(color=await self.bot.get_embed_color(None), description=f"Fish has been reset.")
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
|
|
Loading…
Reference in a new issue