aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
Diffstat (limited to 'bot')
-rw-r--r--bot/__init__.py39
-rw-r--r--bot/bot.py8
-rw-r--r--bot/resources/evergreen/magic8ball.json22
-rw-r--r--bot/seasons/__init__.py2
-rw-r--r--bot/seasons/christmas/adventofcode.py2
-rw-r--r--bot/seasons/easter/__init__.py18
-rw-r--r--bot/seasons/evergreen/error_handler.py102
-rw-r--r--bot/seasons/evergreen/fun.py2
-rw-r--r--bot/seasons/evergreen/magic_8ball.py33
-rw-r--r--bot/seasons/evergreen/snakes/__init__.py2
-rw-r--r--bot/seasons/evergreen/snakes/snakes_cog.py11
-rw-r--r--bot/seasons/evergreen/uptime.py2
-rw-r--r--bot/seasons/halloween/candy_collection.py4
-rw-r--r--bot/seasons/halloween/hacktoberstats.py2
-rw-r--r--bot/seasons/halloween/halloween_facts.py3
-rw-r--r--bot/seasons/halloween/halloweenify.py4
-rw-r--r--bot/seasons/halloween/monstersurvey.py6
-rw-r--r--bot/seasons/halloween/scarymovie.py2
-rw-r--r--bot/seasons/halloween/spookyavatar.py2
-rw-r--r--bot/seasons/halloween/spookygif.py4
-rw-r--r--bot/seasons/halloween/spookyreact.py4
-rw-r--r--bot/seasons/halloween/spookysound.py2
-rw-r--r--bot/seasons/valentines/be_my_valentine.py4
-rw-r--r--bot/seasons/valentines/lovecalculator.py5
-rw-r--r--bot/seasons/valentines/movie_generator.py2
-rw-r--r--bot/seasons/valentines/myvalenstate.py2
-rw-r--r--bot/seasons/valentines/pickuplines.py2
-rw-r--r--bot/seasons/valentines/savethedate.py2
-rw-r--r--bot/seasons/valentines/valentine_zodiac.py2
-rw-r--r--bot/seasons/valentines/whoisvalentine.py1
30 files changed, 189 insertions, 107 deletions
diff --git a/bot/__init__.py b/bot/__init__.py
index dc97df3d..21ff8c97 100644
--- a/bot/__init__.py
+++ b/bot/__init__.py
@@ -1,3 +1,4 @@
+import logging
import logging.handlers
import os
from pathlib import Path
@@ -6,25 +7,45 @@ import arrow
from bot.constants import Client
-# start datetime
+
+# Configure the "TRACE" logging level (e.g. "log.trace(message)")
+logging.TRACE = 5
+logging.addLevelName(logging.TRACE, "TRACE")
+
+
+def monkeypatch_trace(self, msg, *args, **kwargs):
+ """
+ Log 'msg % args' with severity 'TRACE'.
+
+ To pass exception information, use the keyword argument exc_info with a true value, e.g.
+ logger.trace("Houston, we have an %s", "interesting problem", exc_info=1)
+ """
+
+ if self.isEnabledFor(logging.TRACE):
+ self._log(logging.TRACE, msg, args, **kwargs)
+
+
+logging.Logger.trace = monkeypatch_trace
+
+# Set timestamp of when execution started (approximately)
start_time = arrow.utcnow()
-# set up logging
+# Set up file logging
log_dir = Path("bot", "log")
log_file = log_dir / "hackbot.log"
os.makedirs(log_dir, exist_ok=True)
-# file handler sets up rotating logs every 5 MB
+# File handler rotates logs every 5 MB
file_handler = logging.handlers.RotatingFileHandler(
log_file, maxBytes=5*(2**20), backupCount=10)
-file_handler.setLevel(logging.DEBUG)
+file_handler.setLevel(logging.TRACE if Client.debug else logging.DEBUG)
-# console handler prints to terminal
+# Console handler prints to terminal
console_handler = logging.StreamHandler()
-level = logging.DEBUG if Client.debug else logging.INFO
+level = logging.TRACE if Client.debug else logging.INFO
console_handler.setLevel(level)
-# remove old loggers if any
+# Remove old loggers, if any
root = logging.getLogger()
if root.handlers:
for handler in root.handlers:
@@ -34,11 +55,11 @@ if root.handlers:
logging.getLogger("discord").setLevel(logging.ERROR)
logging.getLogger("websockets").setLevel(logging.ERROR)
-# setup new logging configuration
+# Setup new logging configuration
logging.basicConfig(
format='%(asctime)s - %(name)s %(levelname)s: %(message)s',
datefmt="%D %H:%M:%S",
- level=logging.DEBUG,
+ level=logging.TRACE if Client.debug else logging.DEBUG,
handlers=[console_handler, file_handler]
)
logging.getLogger().info('Logging initialization complete')
diff --git a/bot/bot.py b/bot/bot.py
index 96caf9e3..f3b1acbb 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -6,7 +6,6 @@ from typing import List
from aiohttp import AsyncResolver, ClientSession, TCPConnector
from discord import Embed
from discord.ext import commands
-from discord.ext.commands import Bot
from bot import constants
@@ -15,16 +14,13 @@ log = logging.getLogger(__name__)
__all__ = ('SeasonalBot',)
-class SeasonalBot(Bot):
+class SeasonalBot(commands.Bot):
"""Base bot instance."""
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.http_session = ClientSession(
- connector=TCPConnector(
- resolver=AsyncResolver(),
- family=socket.AF_INET,
- )
+ connector=TCPConnector(resolver=AsyncResolver(), family=socket.AF_INET)
)
def load_extensions(self, exts: List[str]):
diff --git a/bot/resources/evergreen/magic8ball.json b/bot/resources/evergreen/magic8ball.json
new file mode 100644
index 00000000..6fe86950
--- /dev/null
+++ b/bot/resources/evergreen/magic8ball.json
@@ -0,0 +1,22 @@
+[
+ "It is certain",
+ "It is decidedly so",
+ "Without a doubt",
+ "Yes definitely",
+ "You may rely on it",
+ "As I see it, yes",
+ "Most likely",
+ "Outlook good",
+ "Yes",
+ "Signs point to yes",
+ "Reply hazy try again",
+ "Ask again later",
+ "Better not tell you now",
+ "Cannot predict now",
+ "Concentrate and ask again",
+ "Don't count on it",
+ "My reply is no",
+ "My sources say no",
+ "Outlook not so good",
+ "Very doubtful"
+] \ No newline at end of file
diff --git a/bot/seasons/__init__.py b/bot/seasons/__init__.py
index c43334a4..1512fae2 100644
--- a/bot/seasons/__init__.py
+++ b/bot/seasons/__init__.py
@@ -9,4 +9,4 @@ log = logging.getLogger(__name__)
def setup(bot):
bot.add_cog(SeasonManager(bot))
- log.debug("SeasonManager cog loaded")
+ log.info("SeasonManager cog loaded")
diff --git a/bot/seasons/christmas/adventofcode.py b/bot/seasons/christmas/adventofcode.py
index 2fd474db..f61f34b5 100644
--- a/bot/seasons/christmas/adventofcode.py
+++ b/bot/seasons/christmas/adventofcode.py
@@ -714,4 +714,4 @@ def setup(bot: commands.Bot) -> None:
"""Advent of Code Cog load."""
bot.add_cog(AdventOfCode(bot))
- log.info("Cog loaded: adventofcode")
+ log.info("AdventOfCode cog loaded")
diff --git a/bot/seasons/easter/__init__.py b/bot/seasons/easter/__init__.py
new file mode 100644
index 00000000..c1de5811
--- /dev/null
+++ b/bot/seasons/easter/__init__.py
@@ -0,0 +1,18 @@
+from bot.seasons import SeasonBase
+
+
+class Easter(SeasonBase):
+ """
+ Easter is a beautiful time of the year often celebrated after the first Full Moon of the new spring season.
+
+ This time is quite beautiful due to the colorful flowers coming out to greet us. So let's greet Spring
+ in an Easter celebration of contributions.
+ """
+
+ name = "easter"
+ bot_name = "BunnyBot"
+ greeting = "Happy Easter to us all!"
+
+ # Duration of season
+ start_date = "01/04"
+ end_date = "30/04"
diff --git a/bot/seasons/evergreen/error_handler.py b/bot/seasons/evergreen/error_handler.py
index dcdbe4e9..b0d05c41 100644
--- a/bot/seasons/evergreen/error_handler.py
+++ b/bot/seasons/evergreen/error_handler.py
@@ -14,101 +14,93 @@ class CommandErrorHandler:
def __init__(self, bot):
self.bot = bot
+ @staticmethod
+ def revert_cooldown_counter(command, message):
+ """Undoes the last cooldown counter for user-error cases."""
+ if command._buckets.valid:
+ bucket = command._buckets.get_bucket(message)
+ bucket._tokens = min(bucket.rate, bucket._tokens + 1)
+ logging.debug(
+ "Cooldown counter reverted as the command was not used correctly."
+ )
+
+ @commands.Cog.listener()
async def on_command_error(self, ctx, error):
"""Activates when a command opens an error."""
if hasattr(ctx.command, 'on_error'):
return logging.debug(
- "A command error occured but "
- "the command had it's own error handler"
+ "A command error occured but the command had it's own error handler."
)
+
error = getattr(error, 'original', error)
+
if isinstance(error, commands.CommandNotFound):
return logging.debug(
- f"{ctx.author} called '{ctx.message.content}' "
- "but no command was found"
+ f"{ctx.author} called '{ctx.message.content}' but no command was found."
)
+
if isinstance(error, commands.UserInputError):
logging.debug(
- f"{ctx.author} called the command '{ctx.command}' "
- "but entered invalid input!"
+ f"{ctx.author} called the command '{ctx.command}' but entered invalid input!"
)
+
+ self.revert_cooldown_counter(ctx.command, ctx.message)
+
return await ctx.send(
- ":no_entry: The command you specified failed to run."
+ ":no_entry: The command you specified failed to run. "
"This is because the arguments you provided were invalid."
)
+
if isinstance(error, commands.CommandOnCooldown):
logging.debug(
- f"{ctx.author} called the command '{ctx.command}' "
- "but they were on cooldown!"
+ f"{ctx.author} called the command '{ctx.command}' but they were on cooldown!"
)
- seconds = error.retry_after
- remaining_minutes, remaining_seconds = divmod(seconds, 60)
- time_remaining = f'{int(remaining_minutes)} minutes {math.ceil(remaining_seconds)} seconds'
+ remaining_minutes, remaining_seconds = divmod(error.retry_after, 60)
+
return await ctx.send(
- "This command is on cooldown,"
- f" please retry in {time_remaining}."
+ "This command is on cooldown, please retry in "
+ f"{int(remaining_minutes)} minutes {math.ceil(remaining_seconds)} seconds."
)
+
if isinstance(error, commands.DisabledCommand):
logging.debug(
- f"{ctx.author} called the command '{ctx.command}' "
- "but the command was disabled!"
- )
- return await ctx.send(
- ":no_entry: This command has been disabled."
+ f"{ctx.author} called the command '{ctx.command}' but the command was disabled!"
)
+ return await ctx.send(":no_entry: This command has been disabled.")
+
if isinstance(error, commands.NoPrivateMessage):
logging.debug(
f"{ctx.author} called the command '{ctx.command}' "
"in a private message however the command was guild only!"
)
- return await ctx.author.send(
- ":no_entry: This command can only be used inside a server."
- )
+ return await ctx.author.send(":no_entry: This command can only be used in the server.")
+
if isinstance(error, commands.BadArgument):
- if ctx.command.qualified_name == 'tag list':
- logging.debug(
- f"{ctx.author} called the command '{ctx.command}' "
- "but entered an invalid user!"
- )
- return await ctx.send(
- "I could not find that member. Please try again."
- )
- else:
- logging.debug(
- f"{ctx.author} called the command '{ctx.command}' "
- "but entered a bad argument!"
- )
- return await ctx.send(
- "The argument you provided was invalid."
- )
- if isinstance(error, commands.CheckFailure):
+ self.revert_cooldown_counter(ctx.command, ctx.message)
+
logging.debug(
- f"{ctx.author} called the command '{ctx.command}' "
- "but the checks failed!"
- )
- return await ctx.send(
- ":no_entry: You are not authorized to use this command."
+ f"{ctx.author} called the command '{ctx.command}' but entered a bad argument!"
)
- print(
- f"Ignoring exception in command {ctx.command}:",
- file=sys.stderr
- )
+ return await ctx.send("The argument you provided was invalid.")
+
+ if isinstance(error, commands.CheckFailure):
+ logging.debug(f"{ctx.author} called the command '{ctx.command}' but the checks failed!")
+ return await ctx.send(":no_entry: You are not authorized to use this command.")
+
+ print(f"Ignoring exception in command {ctx.command}:", file=sys.stderr)
+
logging.warning(
f"{ctx.author} called the command '{ctx.command}' "
"however the command failed to run with the error:"
f"-------------\n{error}"
)
- traceback.print_exception(
- type(error),
- error,
- error.__traceback__,
- file=sys.stderr
- )
+
+ traceback.print_exception(type(error), error, error.__traceback__, file=sys.stderr)
def setup(bot):
"""Error handler Cog load."""
bot.add_cog(CommandErrorHandler(bot))
- log.debug("CommandErrorHandler cog loaded")
+ log.info("CommandErrorHandler cog loaded")
diff --git a/bot/seasons/evergreen/fun.py b/bot/seasons/evergreen/fun.py
index f5814a80..286d8462 100644
--- a/bot/seasons/evergreen/fun.py
+++ b/bot/seasons/evergreen/fun.py
@@ -33,4 +33,4 @@ def setup(bot):
"""Fun Cog load."""
bot.add_cog(Fun(bot))
- log.debug("Fun cog loaded")
+ log.info("Fun cog loaded")
diff --git a/bot/seasons/evergreen/magic_8ball.py b/bot/seasons/evergreen/magic_8ball.py
new file mode 100644
index 00000000..7b5f8e1a
--- /dev/null
+++ b/bot/seasons/evergreen/magic_8ball.py
@@ -0,0 +1,33 @@
+import json
+import logging
+import random
+from pathlib import Path
+
+from discord.ext import commands
+
+log = logging.getLogger(__name__)
+
+
+class Magic8ball:
+ """A Magic 8ball command to respond to a users question."""
+
+ def __init__(self, bot):
+ self.bot = bot
+ with open(Path("bot", "resources", "evergreen", "magic8ball.json"), "r") as file:
+ self.answers = json.load(file)
+
+ @commands.command(name="8ball")
+ async def output_answer(self, ctx, *, question):
+ """Return a magic 8 ball answer from answers list."""
+ if len(question.split()) >= 3:
+ answer = random.choice(self.answers)
+ await ctx.send(answer)
+ else:
+ await ctx.send("Usage: .8ball <question> (minimum length of 3 eg: `will I win?`)")
+
+
+def setup(bot):
+ """Magic 8ball cog load."""
+
+ bot.add_cog(Magic8ball(bot))
+ log.info("Magic8ball cog loaded")
diff --git a/bot/seasons/evergreen/snakes/__init__.py b/bot/seasons/evergreen/snakes/__init__.py
index 88793308..5188200e 100644
--- a/bot/seasons/evergreen/snakes/__init__.py
+++ b/bot/seasons/evergreen/snakes/__init__.py
@@ -9,4 +9,4 @@ def setup(bot):
"""Snakes Cog load."""
bot.add_cog(Snakes(bot))
- log.info("Cog loaded: Snakes")
+ log.info("Snakes cog loaded")
diff --git a/bot/seasons/evergreen/snakes/snakes_cog.py b/bot/seasons/evergreen/snakes/snakes_cog.py
index dc5fb104..3ffdf1bf 100644
--- a/bot/seasons/evergreen/snakes/snakes_cog.py
+++ b/bot/seasons/evergreen/snakes/snakes_cog.py
@@ -15,7 +15,7 @@ import aiohttp
import async_timeout
from PIL import Image, ImageDraw, ImageFont
from discord import Colour, Embed, File, Member, Message, Reaction
-from discord.ext.commands import BadArgument, Bot, Context, bot_has_permissions, group
+from discord.ext.commands import BadArgument, Bot, Cog, Context, bot_has_permissions, group
from bot.constants import ERROR_REPLIES, Tokens
from bot.decorators import locked
@@ -132,7 +132,7 @@ CARD = {
# endregion
-class Snakes:
+class Snakes(Cog):
"""
Commands related to snakes, created by our community during the first code jam.
@@ -1198,10 +1198,3 @@ class Snakes:
await ctx.send(embed=embed)
# endregion
-
-
-def setup(bot):
- """Snake Cog load."""
-
- bot.add_cog(Snakes(bot))
- log.info("Cog loaded: Snakes")
diff --git a/bot/seasons/evergreen/uptime.py b/bot/seasons/evergreen/uptime.py
index d6b59a69..4d5ac584 100644
--- a/bot/seasons/evergreen/uptime.py
+++ b/bot/seasons/evergreen/uptime.py
@@ -33,4 +33,4 @@ def setup(bot):
"""Uptime Cog load."""
bot.add_cog(Uptime(bot))
- log.debug("Uptime cog loaded")
+ log.info("Uptime cog loaded")
diff --git a/bot/seasons/halloween/candy_collection.py b/bot/seasons/halloween/candy_collection.py
index 1bfbc00a..2e010cbc 100644
--- a/bot/seasons/halloween/candy_collection.py
+++ b/bot/seasons/halloween/candy_collection.py
@@ -33,6 +33,7 @@ class CandyCollection:
userid = userinfo['userid']
self.get_candyinfo[userid] = userinfo
+ @commands.Cog.listener()
async def on_message(self, message):
"""Randomly adds candy or skull reaction to non-bot messages in the Event channel."""
@@ -54,6 +55,7 @@ class CandyCollection:
self.msg_reacted.append(d)
return await message.add_reaction('\N{CANDY}')
+ @commands.Cog.listener()
async def on_reaction_add(self, reaction, user):
"""Add/remove candies from a person if the reaction satisfies criteria."""
@@ -225,4 +227,4 @@ def setup(bot):
"""Candy Collection game Cog load."""
bot.add_cog(CandyCollection(bot))
- log.debug("CandyCollection cog loaded")
+ log.info("CandyCollection cog loaded")
diff --git a/bot/seasons/halloween/hacktoberstats.py b/bot/seasons/halloween/hacktoberstats.py
index 3e2a261d..ce32ad9f 100644
--- a/bot/seasons/halloween/hacktoberstats.py
+++ b/bot/seasons/halloween/hacktoberstats.py
@@ -341,4 +341,4 @@ def setup(bot):
"""Hacktoberstats Cog load."""
bot.add_cog(HacktoberStats(bot))
- log.debug("HacktoberStats cog loaded")
+ log.info("HacktoberStats cog loaded")
diff --git a/bot/seasons/halloween/halloween_facts.py b/bot/seasons/halloween/halloween_facts.py
index 21c70e76..3ec65b87 100644
--- a/bot/seasons/halloween/halloween_facts.py
+++ b/bot/seasons/halloween/halloween_facts.py
@@ -36,6 +36,7 @@ class HalloweenFacts:
self.facts = list(enumerate(self.halloween_facts))
random.shuffle(self.facts)
+ @commands.Cog.listener()
async def on_ready(self):
"""Get event Channel object and initialize fact task loop."""
@@ -68,4 +69,4 @@ def setup(bot):
"""Halloween facts Cog load."""
bot.add_cog(HalloweenFacts(bot))
- log.debug("HalloweenFacts cog loaded")
+ log.info("HalloweenFacts cog loaded")
diff --git a/bot/seasons/halloween/halloweenify.py b/bot/seasons/halloween/halloweenify.py
index 5b710f7f..daf64ac0 100644
--- a/bot/seasons/halloween/halloweenify.py
+++ b/bot/seasons/halloween/halloweenify.py
@@ -11,7 +11,7 @@ log = logging.getLogger(__name__)
class Halloweenify:
- """A cog to change a invokers nickname to a spooky one."""
+ """A cog to change a invokers nickname to a spooky one!"""
def __init__(self, bot):
self.bot = bot
@@ -51,4 +51,4 @@ def setup(bot):
"""Halloweenify Cog load."""
bot.add_cog(Halloweenify(bot))
- log.debug("Halloweenify cog loaded")
+ log.info("Halloweenify cog loaded")
diff --git a/bot/seasons/halloween/monstersurvey.py b/bot/seasons/halloween/monstersurvey.py
index 44400a72..2ae98f6e 100644
--- a/bot/seasons/halloween/monstersurvey.py
+++ b/bot/seasons/halloween/monstersurvey.py
@@ -4,7 +4,7 @@ import os
from discord import Embed
from discord.ext import commands
-from discord.ext.commands import Bot, Context
+from discord.ext.commands import Bot, Cog, Context
log = logging.getLogger(__name__)
@@ -14,7 +14,7 @@ EMOJIS = {
}
-class MonsterSurvey:
+class MonsterSurvey(Cog):
"""
Vote for your favorite monster.
@@ -227,4 +227,4 @@ def setup(bot):
"""Monster survey Cog load."""
bot.add_cog(MonsterSurvey(bot))
- log.debug("MonsterSurvey cog loaded")
+ log.info("MonsterSurvey cog loaded")
diff --git a/bot/seasons/halloween/scarymovie.py b/bot/seasons/halloween/scarymovie.py
index 9108c76f..5651c9bb 100644
--- a/bot/seasons/halloween/scarymovie.py
+++ b/bot/seasons/halloween/scarymovie.py
@@ -133,4 +133,4 @@ def setup(bot):
"""Scary movie Cog load."""
bot.add_cog(ScaryMovie(bot))
- log.debug("ScaryMovie cog loaded")
+ log.info("ScaryMovie cog loaded")
diff --git a/bot/seasons/halloween/spookyavatar.py b/bot/seasons/halloween/spookyavatar.py
index 5c13ad77..042df701 100644
--- a/bot/seasons/halloween/spookyavatar.py
+++ b/bot/seasons/halloween/spookyavatar.py
@@ -52,4 +52,4 @@ def setup(bot):
"""Spooky avatar Cog load."""
bot.add_cog(SpookyAvatar(bot))
- log.debug("SpookyAvatar cog loaded")
+ log.info("SpookyAvatar cog loaded")
diff --git a/bot/seasons/halloween/spookygif.py b/bot/seasons/halloween/spookygif.py
index f898d28b..ce8aef06 100644
--- a/bot/seasons/halloween/spookygif.py
+++ b/bot/seasons/halloween/spookygif.py
@@ -10,7 +10,7 @@ log = logging.getLogger(__name__)
class SpookyGif:
- """A cog to fetch a random spooky gif from the web."""
+ """A cog to fetch a random spooky gif from the web!"""
def __init__(self, bot):
self.bot = bot
@@ -38,4 +38,4 @@ def setup(bot):
"""Spooky GIF Cog load."""
bot.add_cog(SpookyGif(bot))
- log.debug("SpookyGif cog loaded")
+ log.info("SpookyGif cog loaded")
diff --git a/bot/seasons/halloween/spookyreact.py b/bot/seasons/halloween/spookyreact.py
index 553bd285..f1dbb905 100644
--- a/bot/seasons/halloween/spookyreact.py
+++ b/bot/seasons/halloween/spookyreact.py
@@ -2,6 +2,7 @@ import logging
import re
import discord
+from discord.ext.commands import Cog
log = logging.getLogger(__name__)
@@ -22,6 +23,7 @@ class SpookyReact:
def __init__(self, bot):
self.bot = bot
+ @Cog.listener()
async def on_message(self, ctx: discord.Message):
"""
A command to send the seasonalbot github project.
@@ -70,4 +72,4 @@ def setup(bot):
"""Spooky reaction Cog load."""
bot.add_cog(SpookyReact(bot))
- log.debug("SpookyReact cog loaded")
+ log.info("SpookyReact cog loaded")
diff --git a/bot/seasons/halloween/spookysound.py b/bot/seasons/halloween/spookysound.py
index cff50897..b62a9893 100644
--- a/bot/seasons/halloween/spookysound.py
+++ b/bot/seasons/halloween/spookysound.py
@@ -47,4 +47,4 @@ def setup(bot):
"""Spooky sound Cog load."""
bot.add_cog(SpookySound(bot))
- log.debug("SpookySound cog loaded")
+ log.info("SpookySound cog loaded")
diff --git a/bot/seasons/valentines/be_my_valentine.py b/bot/seasons/valentines/be_my_valentine.py
index 6abccceb..d90e73aa 100644
--- a/bot/seasons/valentines/be_my_valentine.py
+++ b/bot/seasons/valentines/be_my_valentine.py
@@ -16,7 +16,7 @@ HEART_EMOJIS = [":heart:", ":gift_heart:", ":revolving_hearts:", ":sparkling_hea
class BeMyValentine:
- """A cog that sends Valentines to other users."""
+ """A cog that sends Valentines to other users!"""
def __init__(self, bot):
self.bot = bot
@@ -243,4 +243,4 @@ def setup(bot):
"""Be my Valentine Cog load."""
bot.add_cog(BeMyValentine(bot))
- log.debug("Be My Valentine cog loaded")
+ log.info("BeMyValentine cog loaded")
diff --git a/bot/seasons/valentines/lovecalculator.py b/bot/seasons/valentines/lovecalculator.py
index 56cb551d..cd684f9d 100644
--- a/bot/seasons/valentines/lovecalculator.py
+++ b/bot/seasons/valentines/lovecalculator.py
@@ -9,7 +9,7 @@ from typing import Union
import discord
from discord import Member
from discord.ext import commands
-from discord.ext.commands import BadArgument, clean_content
+from discord.ext.commands import BadArgument, Cog, clean_content
from bot.constants import Roles
@@ -20,7 +20,7 @@ with Path('bot', 'resources', 'valentines', 'love_matches.json').open() as file:
LOVE_DATA = sorted((int(key), value) for key, value in LOVE_DATA.items())
-class LoveCalculator:
+class LoveCalculator(Cog):
"""A cog for calculating the love between two people."""
def __init__(self, bot):
@@ -104,3 +104,4 @@ def setup(bot):
"""Love calculator Cog load."""
bot.add_cog(LoveCalculator(bot))
+ log.info("LoveCalculator cog loaded")
diff --git a/bot/seasons/valentines/movie_generator.py b/bot/seasons/valentines/movie_generator.py
index 19fbf25e..1b1a4a2d 100644
--- a/bot/seasons/valentines/movie_generator.py
+++ b/bot/seasons/valentines/movie_generator.py
@@ -62,4 +62,4 @@ def setup(bot):
"""Romance movie Cog load."""
bot.add_cog(RomanceMovieFinder(bot))
- log.debug("Random romance movie cog loaded!")
+ log.info("RomanceMovieFinder cog loaded")
diff --git a/bot/seasons/valentines/myvalenstate.py b/bot/seasons/valentines/myvalenstate.py
index 46fdebbc..0ea8fbab 100644
--- a/bot/seasons/valentines/myvalenstate.py
+++ b/bot/seasons/valentines/myvalenstate.py
@@ -87,4 +87,4 @@ def setup(bot):
"""Valenstate Cog load."""
bot.add_cog(MyValenstate(bot))
- log.debug("MyValenstate cog loaded")
+ log.info("MyValenstate cog loaded")
diff --git a/bot/seasons/valentines/pickuplines.py b/bot/seasons/valentines/pickuplines.py
index bce5cdcc..193eb788 100644
--- a/bot/seasons/valentines/pickuplines.py
+++ b/bot/seasons/valentines/pickuplines.py
@@ -44,4 +44,4 @@ def setup(bot):
"""Pickup lines Cog load."""
bot.add_cog(PickupLine(bot))
- log.info('Pickup line cog loaded')
+ log.info('PickupLine cog loaded')
diff --git a/bot/seasons/valentines/savethedate.py b/bot/seasons/valentines/savethedate.py
index 9f1dbaaa..76f418a2 100644
--- a/bot/seasons/valentines/savethedate.py
+++ b/bot/seasons/valentines/savethedate.py
@@ -41,4 +41,4 @@ def setup(bot):
"""Save the date Cog Load."""
bot.add_cog(SaveTheDate(bot))
- log.debug("Save the date cog loaded")
+ log.info("SaveTheDate cog loaded")
diff --git a/bot/seasons/valentines/valentine_zodiac.py b/bot/seasons/valentines/valentine_zodiac.py
index e18196fc..764c8ccc 100644
--- a/bot/seasons/valentines/valentine_zodiac.py
+++ b/bot/seasons/valentines/valentine_zodiac.py
@@ -58,4 +58,4 @@ def setup(bot):
"""Valentine Zodiac Cog load."""
bot.add_cog(ValentineZodiac(bot))
- log.debug("Valentine Zodiac cog loaded")
+ log.info("ValentineZodiac cog loaded")
diff --git a/bot/seasons/valentines/whoisvalentine.py b/bot/seasons/valentines/whoisvalentine.py
index 9ac2ee94..b7c47121 100644
--- a/bot/seasons/valentines/whoisvalentine.py
+++ b/bot/seasons/valentines/whoisvalentine.py
@@ -53,3 +53,4 @@ def setup(bot):
"""Who is Valentine Cog load."""
bot.add_cog(ValentineFacts(bot))
+ log.info("ValentineFacts cog loaded")