aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts')
-rw-r--r--bot/exts/easter/egg_facts.py8
-rw-r--r--bot/exts/evergreen/game.py6
-rw-r--r--bot/exts/evergreen/help.py8
-rw-r--r--bot/exts/evergreen/issues.py2
-rw-r--r--bot/exts/evergreen/source.py2
-rw-r--r--bot/exts/evergreen/space.py6
-rw-r--r--bot/exts/halloween/candy_collection.py6
-rw-r--r--bot/exts/halloween/hacktoberstats.py6
-rw-r--r--bot/exts/halloween/spookyreact.py6
-rw-r--r--bot/exts/pride/pride_facts.py8
-rw-r--r--bot/exts/utils/extensions.py2
-rw-r--r--bot/exts/valentines/be_my_valentine.py2
12 files changed, 29 insertions, 33 deletions
diff --git a/bot/exts/easter/egg_facts.py b/bot/exts/easter/egg_facts.py
index 0051aa50..761e9059 100644
--- a/bot/exts/easter/egg_facts.py
+++ b/bot/exts/easter/egg_facts.py
@@ -6,7 +6,7 @@ from pathlib import Path
import discord
from discord.ext import commands
-from bot.bot import SeasonalBot
+from bot.bot import Bot
from bot.constants import Channels, Colours, Month
from bot.utils.decorators import seasonal_task
@@ -20,7 +20,7 @@ class EasterFacts(commands.Cog):
It also contains a background task which sends an easter egg fact in the event channel everyday.
"""
- def __init__(self, bot: SeasonalBot):
+ def __init__(self, bot: Bot):
self.bot = bot
self.facts = self.load_json()
@@ -38,7 +38,7 @@ class EasterFacts(commands.Cog):
"""A background task that sends an easter egg fact in the event channel everyday."""
await self.bot.wait_until_guild_available()
- channel = self.bot.get_channel(Channels.seasonalbot_commands)
+ channel = self.bot.get_channel(Channels.community_bot_commands)
await channel.send(embed=self.make_embed())
@commands.command(name='eggfact', aliases=['fact'])
@@ -56,6 +56,6 @@ class EasterFacts(commands.Cog):
)
-def setup(bot: SeasonalBot) -> None:
+def setup(bot: Bot) -> None:
"""Easter Egg facts cog load."""
bot.add_cog(EasterFacts(bot))
diff --git a/bot/exts/evergreen/game.py b/bot/exts/evergreen/game.py
index 3c8b2725..d0fd7a40 100644
--- a/bot/exts/evergreen/game.py
+++ b/bot/exts/evergreen/game.py
@@ -11,7 +11,7 @@ from discord import Embed
from discord.ext import tasks
from discord.ext.commands import Cog, Context, group
-from bot.bot import SeasonalBot
+from bot.bot import Bot
from bot.constants import STAFF_ROLES, Tokens
from bot.utils.decorators import with_role
from bot.utils.pagination import ImagePaginator, LinePaginator
@@ -130,7 +130,7 @@ class AgeRatings(IntEnum):
class Games(Cog):
"""Games Cog contains commands that collect data from IGDB."""
- def __init__(self, bot: SeasonalBot):
+ def __init__(self, bot: Bot):
self.bot = bot
self.http_session: ClientSession = bot.http_session
@@ -415,7 +415,7 @@ class Games(Cog):
return sorted((item for item in results if item[0] >= 0.60), reverse=True)[:4]
-def setup(bot: SeasonalBot) -> None:
+def setup(bot: Bot) -> None:
"""Add/Load Games cog."""
# Check does IGDB API key exist, if not, log warning and don't load cog
if not Tokens.igdb:
diff --git a/bot/exts/evergreen/help.py b/bot/exts/evergreen/help.py
index ccd76d76..91147243 100644
--- a/bot/exts/evergreen/help.py
+++ b/bot/exts/evergreen/help.py
@@ -12,7 +12,7 @@ from discord.ext.commands import CheckFailure, Cog as DiscordCog, Command, Conte
from fuzzywuzzy import fuzz, process
from bot import constants
-from bot.bot import SeasonalBot
+from bot.bot import Bot
from bot.constants import Emojis
from bot.utils.pagination import (
FIRST_EMOJI, LAST_EMOJI,
@@ -511,7 +511,7 @@ class Help(DiscordCog):
await ctx.send(embed=embed)
-def unload(bot: SeasonalBot) -> None:
+def unload(bot: Bot) -> None:
"""
Reinstates the original help command.
@@ -521,7 +521,7 @@ def unload(bot: SeasonalBot) -> None:
bot.add_command(bot._old_help)
-def setup(bot: SeasonalBot) -> None:
+def setup(bot: Bot) -> None:
"""
The setup for the help extension.
@@ -542,7 +542,7 @@ def setup(bot: SeasonalBot) -> None:
raise
-def teardown(bot: SeasonalBot) -> None:
+def teardown(bot: Bot) -> None:
"""
The teardown for the help extension.
diff --git a/bot/exts/evergreen/issues.py b/bot/exts/evergreen/issues.py
index 97ee6a12..e419a6f5 100644
--- a/bot/exts/evergreen/issues.py
+++ b/bot/exts/evergreen/issues.py
@@ -33,7 +33,7 @@ class Issues(commands.Cog):
self,
ctx: commands.Context,
numbers: commands.Greedy[int],
- repository: str = "seasonalbot",
+ repository: str = "sir-lancebot",
user: str = "python-discord"
) -> None:
"""Command to retrieve issue(s) from a GitHub repository."""
diff --git a/bot/exts/evergreen/source.py b/bot/exts/evergreen/source.py
index 0725714f..cdfe54ec 100644
--- a/bot/exts/evergreen/source.py
+++ b/bot/exts/evergreen/source.py
@@ -38,7 +38,7 @@ class BotSource(commands.Cog):
async def source_command(self, ctx: commands.Context, *, source_item: SourceConverter = None) -> None:
"""Display information and a GitHub link to the source code of a command, tag, or cog."""
if not source_item:
- embed = Embed(title="Seasonal Bot's GitHub Repository")
+ embed = Embed(title="Sir Lancebot's GitHub Repository")
embed.add_field(name="Repository", value=f"[Go to GitHub]({Source.github})")
embed.set_thumbnail(url=Source.github_avatar_url)
await ctx.send(embed=embed)
diff --git a/bot/exts/evergreen/space.py b/bot/exts/evergreen/space.py
index 3587fc00..bc8e3118 100644
--- a/bot/exts/evergreen/space.py
+++ b/bot/exts/evergreen/space.py
@@ -8,7 +8,7 @@ from discord import Embed
from discord.ext import tasks
from discord.ext.commands import BadArgument, Cog, Context, Converter, group
-from bot.bot import SeasonalBot
+from bot.bot import Bot
from bot.constants import Tokens
logger = logging.getLogger(__name__)
@@ -37,7 +37,7 @@ class DateConverter(Converter):
class Space(Cog):
"""Space Cog contains commands, that show images, facts or other information about space."""
- def __init__(self, bot: SeasonalBot):
+ def __init__(self, bot: Bot):
self.bot = bot
self.http_session = bot.http_session
@@ -240,7 +240,7 @@ class Space(Cog):
).set_image(url=image).set_footer(text="Powered by NASA API" + footer)
-def setup(bot: SeasonalBot) -> None:
+def setup(bot: Bot) -> None:
"""Load Space Cog."""
if not Tokens.nasa:
logger.warning("Can't find NASA API key. Not loading Space Cog.")
diff --git a/bot/exts/halloween/candy_collection.py b/bot/exts/halloween/candy_collection.py
index 33e18b24..0cb37ecd 100644
--- a/bot/exts/halloween/candy_collection.py
+++ b/bot/exts/halloween/candy_collection.py
@@ -51,7 +51,7 @@ class CandyCollection(commands.Cog):
if message.author.bot:
return
# ensure it's hacktober channel
- if message.channel.id != Channels.seasonalbot_commands:
+ if message.channel.id != Channels.community_bot_commands:
return
# do random check for skull first as it has the lower chance
@@ -73,7 +73,7 @@ class CandyCollection(commands.Cog):
return
# check to ensure it is in correct channel
- if message.channel.id != Channels.seasonalbot_commands:
+ if message.channel.id != Channels.community_bot_commands:
return
# if its not a candy or skull, and it is one of 10 most recent messages,
@@ -130,7 +130,7 @@ class CandyCollection(commands.Cog):
@property
def hacktober_channel(self) -> discord.TextChannel:
"""Get #hacktoberbot channel from its ID."""
- return self.bot.get_channel(id=Channels.seasonalbot_commands)
+ return self.bot.get_channel(id=Channels.community_bot_commands)
@staticmethod
async def send_spook_msg(
diff --git a/bot/exts/halloween/hacktoberstats.py b/bot/exts/halloween/hacktoberstats.py
index 26d75565..84b75022 100644
--- a/bot/exts/halloween/hacktoberstats.py
+++ b/bot/exts/halloween/hacktoberstats.py
@@ -193,7 +193,7 @@ class HacktoberStats(commands.Cog):
For each PR:
{
"repo_url": str
- "repo_shortname": str (e.g. "python-discord/seasonalbot")
+ "repo_shortname": str (e.g. "python-discord/sir-lancebot")
"created_at": datetime.datetime
"number": int
}
@@ -360,10 +360,10 @@ class HacktoberStats(commands.Cog):
"""
Extract shortname from https://api.github.com/repos/* URL.
- e.g. "https://api.github.com/repos/python-discord/seasonalbot"
+ e.g. "https://api.github.com/repos/python-discord/sir-lancebot"
|
V
- "python-discord/seasonalbot"
+ "python-discord/sir-lancebot"
"""
exp = r"https?:\/\/api.github.com\/repos\/([/\-\_\.\w]+)"
return re.findall(exp, in_url)[0]
diff --git a/bot/exts/halloween/spookyreact.py b/bot/exts/halloween/spookyreact.py
index e5945aea..21b8ff7c 100644
--- a/bot/exts/halloween/spookyreact.py
+++ b/bot/exts/halloween/spookyreact.py
@@ -30,11 +30,7 @@ class SpookyReact(Cog):
@Cog.listener()
async def on_message(self, ctx: discord.Message) -> None:
"""
- A command to send the seasonalbot github project.
-
- Lines that begin with the bot's command prefix are ignored
-
- Seasonalbot's own messages are ignored
+ Triggered when the bot sees a message in October.
"""
for trigger in SPOOKY_TRIGGERS.keys():
trigger_test = re.search(SPOOKY_TRIGGERS[trigger][0], ctx.content.lower())
diff --git a/bot/exts/pride/pride_facts.py b/bot/exts/pride/pride_facts.py
index 9ff4c9e0..5bd5d0ce 100644
--- a/bot/exts/pride/pride_facts.py
+++ b/bot/exts/pride/pride_facts.py
@@ -9,7 +9,7 @@ import dateutil.parser
import discord
from discord.ext import commands
-from bot.bot import SeasonalBot
+from bot.bot import Bot
from bot.constants import Channels, Colours, Month
from bot.utils.decorators import seasonal_task
@@ -21,7 +21,7 @@ Sendable = Union[commands.Context, discord.TextChannel]
class PrideFacts(commands.Cog):
"""Provides a new fact every day during the Pride season!"""
- def __init__(self, bot: SeasonalBot):
+ def __init__(self, bot: Bot):
self.bot = bot
self.facts = self.load_facts()
@@ -38,7 +38,7 @@ class PrideFacts(commands.Cog):
"""Background task to post the daily pride fact every day."""
await self.bot.wait_until_guild_available()
- channel = self.bot.get_channel(Channels.seasonalbot_commands)
+ channel = self.bot.get_channel(Channels.community_bot_commands)
await self.send_select_fact(channel, datetime.utcnow())
async def send_random_fact(self, ctx: commands.Context) -> None:
@@ -102,6 +102,6 @@ class PrideFacts(commands.Cog):
)
-def setup(bot: SeasonalBot) -> None:
+def setup(bot: Bot) -> None:
"""Cog loader for pride facts."""
bot.add_cog(PrideFacts(bot))
diff --git a/bot/exts/utils/extensions.py b/bot/exts/utils/extensions.py
index 102a0416..bb22c353 100644
--- a/bot/exts/utils/extensions.py
+++ b/bot/exts/utils/extensions.py
@@ -8,7 +8,7 @@ from discord.ext import commands
from discord.ext.commands import Context, group
from bot import exts
-from bot.bot import SeasonalBot as Bot
+from bot.bot import Bot
from bot.constants import Client, Emojis, MODERATION_ROLES, Roles
from bot.utils.checks import with_role_check
from bot.utils.extensions import EXTENSIONS, unqualify
diff --git a/bot/exts/valentines/be_my_valentine.py b/bot/exts/valentines/be_my_valentine.py
index b1258307..4db4d191 100644
--- a/bot/exts/valentines/be_my_valentine.py
+++ b/bot/exts/valentines/be_my_valentine.py
@@ -99,7 +99,7 @@ class BeMyValentine(commands.Cog):
emoji_1, emoji_2 = self.random_emoji()
lovefest_role = discord.utils.get(ctx.guild.roles, id=Lovefest.role_id)
- channel = self.bot.get_channel(Channels.seasonalbot_commands)
+ channel = self.bot.get_channel(Channels.community_bot_commands)
valentine, title = self.valentine_check(valentine_type)
if user is None: