diff --git a/audiotrivia/audiotrivia.py b/audiotrivia/audiotrivia.py index d52838e..8936d0d 100644 --- a/audiotrivia/audiotrivia.py +++ b/audiotrivia/audiotrivia.py @@ -88,9 +88,8 @@ class AudioTrivia(Trivia): if session is not None: await ctx.send("There is already an ongoing trivia session in this channel.") return - status = await self.audio.config.status() - notify = await self.audio.config.notify() + notify = await self.audio.config.guild(ctx.guild).notify() if status: await ctx.send( diff --git a/chatter/chat.py b/chatter/chat.py index cd90fcb..3daa957 100644 --- a/chatter/chat.py +++ b/chatter/chat.py @@ -80,7 +80,7 @@ class Chatter(Cog): send_time = None try: - async for message in channel.history(limit=None, reverse=True, after=after): + async for message in channel.history(limit=None, after=after): # if message.author.bot: # Skip bot messages # continue if new_message(message, send_time, out[i]): @@ -180,6 +180,7 @@ class Chatter(Cog): else: await ctx.send("Error occurred :(") + @commands.Cog.listener() async def on_message(self, message: discord.Message): """ Credit to https://github.com/Twentysix26/26-Cogs/blob/master/cleverbot/cleverbot.py diff --git a/dad/dad.py b/dad/dad.py index d1637dc..f430844 100644 --- a/dad/dad.py +++ b/dad/dad.py @@ -76,6 +76,7 @@ class Dad(Cog): await self.config.guild(ctx.guild).cooldown.set(cooldown) await ctx.send("Dad joke cooldown is now set to {}".format(cooldown)) + @commands.Cog.listener() async def on_message(self, message: discord.Message): guild: discord.Guild = message.guild if guild is None: diff --git a/exclusiverole/exclusiverole.py b/exclusiverole/exclusiverole.py index bd8a38d..e792b44 100644 --- a/exclusiverole/exclusiverole.py +++ b/exclusiverole/exclusiverole.py @@ -89,6 +89,7 @@ class ExclusiveRole(Cog): to_remove = [discord.utils.get(member.guild.roles, id=id) for id in to_remove] await member.remove_roles(*to_remove, reason="Exclusive roles") + @commands.Cog.listener() async def on_member_update(self, before: discord.Member, after: discord.Member): if before.roles == after.roles: return diff --git a/hangman/__init__.py b/hangman/__init__.py index 88598f8..dbc62e7 100644 --- a/hangman/__init__.py +++ b/hangman/__init__.py @@ -4,6 +4,6 @@ from redbot.core import data_manager def setup(bot): n = Hangman(bot) - data_manager.load_bundled_data(n, __file__) + data_manager.bundled_data_path(n) bot.add_cog(n) bot.add_listener(n.on_react, "on_reaction_add") diff --git a/hangman/hangman.py b/hangman/hangman.py index cf2e0a6..69db263 100644 --- a/hangman/hangman.py +++ b/hangman/hangman.py @@ -276,6 +276,7 @@ class Hangman(Cog): await self._reprintgame(message) + @commands.Cog.listener() async def on_react(self, reaction, user): """ Thanks to flapjack reactpoll for guidelines https://github.com/flapjax/FlapJack-Cogs/blob/master/reactpoll/reactpoll.py""" diff --git a/leaver/leaver.py b/leaver/leaver.py index 06377ed..13ff0e0 100644 --- a/leaver/leaver.py +++ b/leaver/leaver.py @@ -34,6 +34,7 @@ class Leaver(Cog): await self.config.guild(guild).channel.set(ctx.channel.id) await ctx.send("Channel set to " + ctx.channel.name) + @commands.Cog.listener() async def on_member_remove(self, member: discord.Member): guild = member.guild channel = await self.config.guild(guild).channel() diff --git a/lseen/lseen.py b/lseen/lseen.py index bed7400..38aee75 100644 --- a/lseen/lseen.py +++ b/lseen/lseen.py @@ -74,6 +74,7 @@ class LastSeen(Cog): embed = discord.Embed(timestamp=last_seen) await ctx.send(embed=embed) + @commands.Cog.listener() async def on_member_update(self, before: discord.Member, after: discord.Member): if before.status != self.offline_status and after.status == self.offline_status: if not await self.config.guild(before.guild).enabled(): diff --git a/planttycoon/__init__.py b/planttycoon/__init__.py index c0f4575..7819b90 100644 --- a/planttycoon/__init__.py +++ b/planttycoon/__init__.py @@ -5,6 +5,6 @@ from .planttycoon import PlantTycoon async def setup(bot): tycoon = PlantTycoon(bot) - data_manager.load_bundled_data(tycoon, __file__) + data_manager.bundled_data_path(tycoon) await tycoon._load_plants_products() # I can access protected members if I want, linter!! bot.add_cog(tycoon) diff --git a/qrinvite/qrinvite.py b/qrinvite/qrinvite.py index 405e325..b57b84a 100644 --- a/qrinvite/qrinvite.py +++ b/qrinvite/qrinvite.py @@ -60,7 +60,7 @@ class QRInvite(Cog): ) return - extension = pathlib.Path(image_url).parts[-1].replace(".", "?").split("?")[1] + eextention = pathlib.Path(image_url).parts[-1].replace(".", "?").split("?")[1] path: pathlib.Path = cog_data_path(self) image_path = path / (ctx.guild.icon + "." + extension) diff --git a/reactrestrict/reactrestrict.py b/reactrestrict/reactrestrict.py index 390d760..339b474 100644 --- a/reactrestrict/reactrestrict.py +++ b/reactrestrict/reactrestrict.py @@ -248,6 +248,7 @@ class ReactRestrict(Cog): await ctx.send("Reaction removed.") + @commands.Cog.listener() async def on_raw_reaction_add( self, emoji: discord.PartialEmoji, message_id: int, channel_id: int, user_id: int ): diff --git a/recyclingplant/__init__.py b/recyclingplant/__init__.py index e012d18..c86df1c 100644 --- a/recyclingplant/__init__.py +++ b/recyclingplant/__init__.py @@ -5,5 +5,5 @@ from .recyclingplant import RecyclingPlant def setup(bot): plant = RecyclingPlant(bot) - data_manager.load_bundled_data(plant, __file__) + data_manager.bundled_data_path(plant) bot.add_cog(plant) diff --git a/stealemoji/stealemoji.py b/stealemoji/stealemoji.py index 2a16bc4..0a12249 100644 --- a/stealemoji/stealemoji.py +++ b/stealemoji/stealemoji.py @@ -78,6 +78,7 @@ class StealEmoji(Cog): await ctx.send("This server has been added as an emoji bank") + @commands.Cog.listener() async def on_reaction_add(self, reaction: discord.Reaction, user: discord.User): """Event handler for reaction watching""" if not reaction.custom_emoji: