aboutsummaryrefslogtreecommitdiffstats
path: root/bot/cogs/halloweenify.py
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2018-11-18 03:28:15 +0100
committerGravatar Leon Sandøy <[email protected]>2018-11-18 03:28:15 +0100
commit0aa910c63ca76fbc2c4329ec6dd3cbb3b4696324 (patch)
treed1edfc4dc3ea837c3dee0b11b2396d54b21ac56b /bot/cogs/halloweenify.py
parentHardcoding EAUTH (diff)
Created an uptime cog. Testing Azure CI deployment.
Diffstat (limited to 'bot/cogs/halloweenify.py')
-rw-r--r--bot/cogs/halloweenify.py48
1 files changed, 0 insertions, 48 deletions
diff --git a/bot/cogs/halloweenify.py b/bot/cogs/halloweenify.py
deleted file mode 100644
index a5fe45ef..00000000
--- a/bot/cogs/halloweenify.py
+++ /dev/null
@@ -1,48 +0,0 @@
-from json import load
-from pathlib import Path
-from random import choice
-
-import discord
-from discord.ext import commands
-from discord.ext.commands.cooldowns import BucketType
-
-
-class Halloweenify:
- """
- A cog to change a invokers nickname to a spooky one!
- """
-
- def __init__(self, bot):
- self.bot = bot
-
- @commands.cooldown(1, 300, BucketType.user)
- @commands.command()
- async def halloweenify(self, ctx):
- """
- Change your nickname into a much spookier one!
- """
- with open(Path('./bot/resources', 'halloweenify.json'), 'r') as f:
- data = load(f)
-
- # Choose a random character from our list we loaded above and set apart the nickname and image url.
- character = choice(data['characters'])
- nickname = ''.join([nickname for nickname in character])
- image = ''.join([character[nickname] for nickname in character])
-
- # Build up a Embed
- embed = discord.Embed()
- embed.colour = discord.Colour.dark_orange()
- embed.title = 'Not spooky enough?'
- embed.description = (
- f'**{ctx.author.display_name}** wasn\'t spooky enough for you? That\'s understandable, '
- f'{ctx.author.display_name} isn\'t scary at all! Let me think of something better. Hmm... I got it!\n\n '
- f'Your new nickname will be: \n :ghost: **{nickname}** :jack_o_lantern:'
- )
- embed.set_image(url=image)
-
- await ctx.author.edit(nick=nickname)
- await ctx.send(embed=embed)
-
-
-def setup(bot):
- bot.add_cog(Halloweenify(bot))