anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: python-discord/sir-lancebot
Issue: ValueError: 3 is not a valid AgeRatingCategories

Sentry Issue: [SIR-LANCEBOT-7H](https://sentry.io/organizations/python-discord/issues/2897191665/?referrer=github_integration)

```
ValueError: 3 is not a valid AgeRatingCategories
(2 additional frame(s) were not displayed)
...
  File "bot/exts/fun/game.py", line 294, in <listcomp>
    pages = [await self.create_page(game) for game in games]
  File "bot/exts/fun/game.py", line 377, in create_page
    rating = ", ".join(
  File "bot/exts/fun/game.py", line 378, in <genexpr>
    f"{AgeRatingCategories(age['category']).name} {AgeRatings(age['rating']).name}"
  File "enum.py", line 384, in __call__
    return cls.__new__(cls, value)
  File "enum.py", line 702, in __new__
    raise ve_exc

Unhandled command error: 3 is not a valid AgeRatingCategories
```

This is caused by the cog not support all of the possible age rating categories. See https://api-docs.igdb.com/#age-rating-enums for what is possible.

While looking, I also noticed that we don't support all of the possible age rating either, which are just below that table in the API docs.

Changed files:
bot/exts/fun/game.py

diff --git a/bot/exts/fun/game.py b/bot/exts/fun/game.py
index f9c150e6..5f56bef7 100644
--- a/bot/exts/fun/game.py
+++ b/bot/exts/fun/game.py
@@ -118,6 +118,7 @@ class GameStatus(IntEnum):
     Offline = 5
     Cancelled = 6
     Rumored = 7
+    Delisted = 8
 
 
 class AgeRatingCategories(IntEnum):
@@ -125,6 +126,11 @@ class AgeRatingCategories(IntEnum):
 
     ESRB = 1
     PEGI = 2
+    CERO = 3
+    USK = 4
+    GRAC = 5
+    CLASS_IND = 6
+    ACB = 7
 
 
 class AgeRatings(IntEnum):
@@ -142,6 +148,32 @@ class AgeRatings(IntEnum):
     T = 10
     M = 11
     AO = 12
+    CERO_A = 13
+    CERO_B = 14
+    CERO_C = 15
+    CERO_D = 16
+    CERO_Z = 17
+    USK_0 = 18
+    USK_6 = 19
+    USK_12 = 20
+    USK_18 = 21
+    GRAC_ALL = 22
+    GRAC_Twelve = 23
+    GRAC_Fifteen = 24
+    GRAC_Eighteen = 25
+    GRAC_TESTING = 26
+    CLASS_IND_L = 27
+    CLASS_IND_Ten = 28
+    CLASS_IND_Twelve = 29
+    CLASS_IND_Fourteen = 30
+    CLASS_IND_Sixteen = 31
+    CLASS_IND_Eighteen = 32
+    ACB_G = 33
+    ACB_PG = 34
+    ACB_M = 35
+    ACB_MA15 = 36
+    ACB_R18 = 37
+    ACB_RC = 38
 
 
 class Games(Cog):
Repository: python-discord/sir-lancebot
Issue: Add TRACE log level

The `TRACE` log level wasn't ported over with the Snakes Cog, so the paginator will throw an exception if it encounters an attempted trace log with `log.trace`.

The implementation can be found in the [bot repo's `__init__.py`](https://github.com/python-discord/bot/blob/master/bot/__init__.py)

Changed files:
bot/__init__.py

diff --git a/bot/__init__.py b/bot/__init__.py
index dc97df3d..54b242ee 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,44 @@ 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 +54,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')
Repository: python-discord/sir-lancebot
Issue: Handle disabled DMs when starting Minesweeper

The minesweeper cog does not currently handle the situation where a user invokes the start command, but doesn't have DMs enabled. Discord will return a 403 and the command will fail on this line.

https://github.com/python-discord/seasonalbot/blob/c6c87378cd6dd65e2fac83b97d48430c3cb0917c/bot/exts/evergreen/minesweeper.py#L154-L158

The problem should be solved similarly to how the AoC cog handles it - by informing the user, in the channel where the command was invoked, that their DMs must be open in order to play minesweeper.

https://github.com/python-discord/seasonalbot/blob/c6c87378cd6dd65e2fac83b97d48430c3cb0917c/bot/exts/christmas/adventofcode.py#L241-L247

---

- [ ] I'd like to implement the bug fix
- [x] Anyone can implement the bug fix


Changed files:
bot/exts/evergreen/minesweeper.py

diff --git a/bot/exts/evergreen/minesweeper.py b/bot/exts/evergreen/minesweeper.py
index ae057b30..3e40f493 100644
--- a/bot/exts/evergreen/minesweeper.py
+++ b/bot/exts/evergreen/minesweeper.py
@@ -141,9 +141,20 @@ class Minesweeper(commands.Cog):
             await ctx.message.delete(delay=2)
             return
 
+        try:
+            await ctx.author.send(
+                f"Play by typing: `{Client.prefix}ms reveal xy [xy]` or `{Client.prefix}ms flag xy [xy]` \\n"
+                f"Close the game with `{Client.prefix}ms end`\\n"
+            )
+        except discord.errors.Forbidden:
+            log.debug(f"{ctx.author.name} ({ctx.author.id}) has disabled DMs from server members")
+            await ctx.send(f":x: {ctx.author.mention}, please enable DMs to play minesweeper.")
+            return
+
         # Add game to list
         board: GameBoard = self.generate_board(bomb_chance)
         revealed_board: GameBoard = [["hidden"] * 10 for _ in range(10)]
+        dm_msg = await ctx.author.send(f"Here's your board!\\n{self.format_for_discord(revealed_board)}")
 
         if ctx.guild:
             await ctx.send(f"{ctx.author.mention} is playing Minesweeper")
@@ -151,12 +162,6 @@ class Minesweeper(commands.Cog):
         else:
             chat_msg = None
 
-        await ctx.author.send(
-            f"Play by typing: `{Client.prefix}ms reveal xy [xy]` or `{Client.prefix}ms flag xy [xy]` \\n"
-            f"Close the game with `{Client.prefix}ms end`\\n"
-        )
-        dm_msg = await ctx.author.send(f"Here's your board!\\n{self.format_for_discord(revealed_board)}")
-
         self.games[ctx.author.id] = Game(
             board=board,
             revealed=revealed_board,
Repository: python-discord/sir-lancebot
Issue: Unhandled tag command error: Command raised an exception: KeyError: 'items' ('items')

Sentry Issue: [SEASONALBOT-11](https://sentry.io/organizations/python-discord/issues/1830840781/?referrer=github_integration)

```
Unhandled tag command error: Command raised an exception: KeyError: 'items' ('items')
```

Changed files:
bot/exts/evergreen/snakes/_snakes_cog.py

diff --git a/bot/exts/evergreen/snakes/_snakes_cog.py b/bot/exts/evergreen/snakes/_snakes_cog.py
index a846274b..70bb0e73 100644
--- a/bot/exts/evergreen/snakes/_snakes_cog.py
+++ b/bot/exts/evergreen/snakes/_snakes_cog.py
@@ -1083,13 +1083,13 @@ class Snakes(Cog):
             url,
             params={
                 "part": "snippet",
-                "q": urllib.parse.quote(query),
+                "q": urllib.parse.quote_plus(query),
                 "type": "video",
                 "key": Tokens.youtube
             }
         )
         response = await response.json()
-        data = response['items']
+        data = response.get("items", [])
 
         # Send the user a video
         if len(data) > 0:
Repository: python-discord/sir-lancebot
Issue: Docstring on 8bitify doesn't match actual code

https://github.com/python-discord/seasonalbot/blob/d77a2bbc50305d05371197f4cfe3354cfca4c627/bot/exts/evergreen/8bitify.py#L20-L22

A bit nitpicky, but after being curious on how it works, I looked it up and saw this little discrepancy.

Docstring says 256 colors (8-bit), but it actually only uses 32 colors (5 bit?). Either of those should probably be adjusted to match the other?

Changed files:
bot/exts/evergreen/8bitify.py

diff --git a/bot/exts/evergreen/8bitify.py b/bot/exts/evergreen/8bitify.py
index c048d9bf..54e68f80 100644
--- a/bot/exts/evergreen/8bitify.py
+++ b/bot/exts/evergreen/8bitify.py
@@ -19,7 +19,7 @@ class EightBitify(commands.Cog):
     @staticmethod
     def quantize(image: Image) -> Image:
         """Reduces colour palette to 256 colours."""
-        return image.quantize(colors=32)
+        return image.quantize()
 
     @commands.command(name="8bitify")
     async def eightbit_command(self, ctx: commands.Context) -> None:
Repository: python-discord/sir-lancebot
Issue: Battleship Cog Causes IndexError

## Description
<!-- Describe the bug you've found -->
The `battleship` cog runs into an error when given lowercased input. An IndexError is caused when trying to get the matching letter from the list of letters. The bot quits the game with the error:
```
An error occurred. Game failed
```


## Steps to Reproduce
<!-- Detail the exact list of steps to be able to encounter the bug -->
1. Start a game of battleship
2. Send a DM containing any spot in lowercase on your turn (example: `a1`)
3. The bot sends the failure message in the commands channel, the index error is raised to console

## Expected Behaviour
<!-- Outline what you expect to occur, include screenshots if relevant -->
The bot should be able to convert between upper and lower case.


## Actual Behaviour
<!-- Outline what occurs instead of the expected behaviour, include screenshots if relevant -->
The bot errors out on lower case. Error:
```py
File "./sir-lancebot/bot/exts/evergreen/battleship.py", line 146, in get_square
     return grid[number-1][index]  # -1 since lists are indexed from 0
IndexError: list index out of range
```

<!-- ## Known Impacted Platforms -->
<!-- Replace [ ] with [x] to mark items -->
<!-- Seriously? This is a discord bot lol -->

## Possible Solutions
<!-- Detail any solutions you might have in mind to be able to resolve the bug -->
You could try converting from lower to uppercase.

Additionally, you can add a try/except around the input section, to report invalid input and stop the bot from failing the game.


## Would you like to implement a fix?

***Note: For high-priority or critical bugs, fixes may be implemented by staff.***
<!-- Replace [ ] with [x] with your choice -->

- [ ] I'd like to implement the bug fix
- [x] Anyone can implement the bug fix


Changed files:
bot/exts/evergreen/battleship.py

diff --git a/bot/exts/evergreen/battleship.py b/bot/exts/evergreen/battleship.py
index 9bc374e6..fa3fb35c 100644
--- a/bot/exts/evergreen/battleship.py
+++ b/bot/exts/evergreen/battleship.py
@@ -140,7 +140,7 @@ class Game:
     @staticmethod
     def get_square(grid: Grid, square: str) -> Square:
         """Grabs a square from a grid with an inputted key."""
-        index = ord(square[0]) - ord("A")
+        index = ord(square[0].upper()) - ord("A")
         number = int(square[1:])
 
         return grid[number-1][index]  # -1 since lists are indexed from 0
Repository: python-discord/sir-lancebot
Issue: Startup Channel Check Bug

## Description
#482 Was merged a couple hours ago, and in it, the following change was introduced:
https://github.com/python-discord/sir-lancebot/blob/53af90f92258905c2bfc4c2db2341dfd1fdc0124/bot/bot.py#L74-L82

This logs an error for every single channel we have into sentry.

## Steps to Reproduce
<!-- Detail the exact list of steps to be able to encounter the bug -->
Startup the bot.


## Expected Behaviour
<!-- Outline what you expect to occur, include screenshots if relevant -->
It should only log missing channels.

## Actual Behaviour
<!-- Outline what occurs instead of the expected behavior, include screenshots if relevant -->
All channels are logged as missing.


## Possible Solutions
<!-- Detail any solutions you might have in mind to be able to resolve the bug -->
So this bug is due to the check on line 81:
https://github.com/python-discord/sir-lancebot/blob/53af90f92258905c2bfc4c2db2341dfd1fdc0124/bot/bot.py#L81

All channels is a set of channel objects. Channel ID is an int, so it'll always return false. We should instead compare it to a set of IDs.

## Additional Details
<!-- Delete this section if not applicable -->
While you're at it, could you please kaizen in a change to ignore this check on dev environments? A lot of these channels can't be set without directly modifying the constants, so invetiably someone will change constants to suppress it, and inventiably it'll be committed and we'll have to clean it up.

## Would you like to implement a fix?

***Note: For high-priority or critical bugs, fixes may be implemented by staff.***
<!-- Replace [ ] with [x] with your choice -->

- [ ] I'd like to implement the bug fix
- [x] Anyone can implement the bug fix


Changed files:
bot/bot.py

diff --git a/bot/bot.py b/bot/bot.py
index 81d59706..e9750697 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -74,11 +74,16 @@ class Bot(commands.Bot):
     async def check_channels(self) -> None:
         """Verifies that all channel constants refer to channels which exist."""
         await self.wait_until_guild_available()
-        all_channels = set(self.get_all_channels())
+
+        if constants.Client.debug:
+            log.info("Skipping Channels Check.")
+            return
+
+        all_channels_ids = [channel.id for channel in self.get_all_channels()]
         for name, channel_id in vars(constants.Channels).items():
             if name.startswith('_'):
                 continue
-            if channel_id not in all_channels:
+            if channel_id not in all_channels_ids:
                 log.error(f'Channel "{name}" with ID {channel_id} missing')
 
     async def send_log(self, title: str, details: str = None, *, icon: str = None) -> None:
Repository: python-discord/sir-lancebot
Issue: Grammatical error in the commented part

## Description
There is a grammatical error in the commented part of [exceptions.py](https://github.com/python-discord/sir-lancebot/blob/main/bot/utils/exceptions.py) 

## Possible Solutions
To reword/fix the comment.

## Would you like to implement a fix?
- [x] I'd like to implement the bug fix
- [ ] Anyone can implement the bug fix


Changed files:
bot/utils/exceptions.py

diff --git a/bot/utils/exceptions.py b/bot/utils/exceptions.py
index 2b1c1b31..9e080759 100644
--- a/bot/utils/exceptions.py
+++ b/bot/utils/exceptions.py
@@ -1,4 +1,4 @@
 class UserNotPlayingError(Exception):
-    """Will raised when user try to use game commands when not playing."""
+    """Raised when users try to use game commands when they are not playing."""
 
     pass
Repository: python-discord/sir-lancebot
Issue: TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

Sentry Issue: [SIR-LANCEBOT-5N](https://sentry.io/organizations/python-discord/issues/2440262025/?referrer=github_integration)

```
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
  File "discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/exts/halloween/scarymovie.py", line 27, in random_movie
    selection = await self.select_movie()
  File "bot/exts/halloween/scarymovie.py", line 50, in select_movie
    params["page"] = random.randint(1, total_pages)
  File "random.py", line 339, in randint
    return self.randrange(a, b+1)

Unhandled command error: unsupported operand type(s) for +: 'NoneType' and 'int'
```

`total_pages` could be None if the data isn't included in the response. We should handle this.

Changed files:
bot/exts/halloween/scarymovie.py

diff --git a/bot/exts/halloween/scarymovie.py b/bot/exts/halloween/scarymovie.py
index f4cf41db..33659fd8 100644
--- a/bot/exts/halloween/scarymovie.py
+++ b/bot/exts/halloween/scarymovie.py
@@ -1,19 +1,14 @@
 import logging
 import random
-from os import environ
 
 from discord import Embed
 from discord.ext import commands
 
 from bot.bot import Bot
-
+from bot.constants import Tokens
 log = logging.getLogger(__name__)
 
 
-TMDB_API_KEY = environ.get("TMDB_API_KEY")
-TMDB_TOKEN = environ.get("TMDB_TOKEN")
-
-
 class ScaryMovie(commands.Cog):
     """Selects a random scary movie and embeds info into Discord chat."""
 
@@ -31,13 +26,14 @@ class ScaryMovie(commands.Cog):
 
     async def select_movie(self) -> dict:
         """Selects a random movie and returns a JSON of movie details from TMDb."""
-        url = "https://api.themoviedb.org/4/discover/movie"
+        url = "https://api.themoviedb.org/3/discover/movie"
         params = {
+            "api_key": Tokens.tmdb,
             "with_genres": "27",
-            "vote_count.gte": "5"
+            "vote_count.gte": "5",
+            "include_adult": "false"
         }
         headers = {
-            "Authorization": "Bearer " + TMDB_TOKEN,
             "Content-Type": "application/json;charset=utf-8"
         }
 
@@ -55,7 +51,7 @@ class ScaryMovie(commands.Cog):
         # Get full details and credits
         async with self.bot.http_session.get(
             url=f"https://api.themoviedb.org/3/movie/{selection_id}",
-            params={"api_key": TMDB_API_KEY, "append_to_response": "credits"}
+            params={"api_key": Tokens.tmdb, "append_to_response": "credits"}
         ) as selection:
 
             return await selection.json()
Repository: python-discord/sir-lancebot
Issue: AttributeError: __enter__

Sentry Issue: [SIR-LANCEBOT-91](https://sentry.io/organizations/python-discord/issues/3752636289/?referrer=github_integration)

```
AttributeError: __enter__
  File "discord/ext/commands/core.py", line 229, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/exts/fun/snakes/_snakes_cog.py", line 601, in draw_command
    with ctx.typing():

Unhandled command error: __enter__
```

Changed files:
bot/exts/fun/snakes/_snakes_cog.py

diff --git a/bot/exts/fun/snakes/_snakes_cog.py b/bot/exts/fun/snakes/_snakes_cog.py
index 96718200..d0542c23 100644
--- a/bot/exts/fun/snakes/_snakes_cog.py
+++ b/bot/exts/fun/snakes/_snakes_cog.py
@@ -598,7 +598,7 @@ class Snakes(Cog):
         Written by Momo and kel.
         Modified by juan and lemon.
         """
-        with ctx.typing():
+        async with ctx.typing():
 
             # Generate random snake attributes
             width = random.randint(6, 10)
@@ -637,7 +637,7 @@ class Snakes(Cog):
 
         Created by Ava and eivl.
         """
-        with ctx.typing():
+        async with ctx.typing():
             if name is None:
                 name = await Snake.random()
 
@@ -693,7 +693,7 @@ class Snakes(Cog):
         Made by Ava and eivl.
         Modified by lemon.
         """
-        with ctx.typing():
+        async with ctx.typing():
 
             image = None
 
@@ -1047,7 +1047,7 @@ class Snakes(Cog):
         Written by Momo and kel.
         Modified by lemon.
         """
-        with ctx.typing():
+        async with ctx.typing():
             embed = Embed()
             user = ctx.author
Repository: python-discord/sir-lancebot
Issue: TypeError: object of type 'NoneType' has no len()

Sentry Issue: [SIR-LANCEBOT-8R](https://sentry.io/organizations/python-discord/issues/3673171895/?referrer=github_integration)

```
TypeError: object of type 'NoneType' has no len()
  File "discord/ext/commands/core.py", line 190, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/exts/holidays/halloween/scarymovie.py", line 23, in random_movie
    selection = await self.select_movie()
  File "bot/exts/holidays/halloween/scarymovie.py", line 50, in select_movie
    selection_id = random.choice(data.get("results")).get("id")
  File "random.py", line 378, in choice
    return seq[self._randbelow(len(seq))]

Unhandled command error: object of type 'NoneType' has no len()
```

Changed files:
bot/exts/holidays/halloween/scarymovie.py

diff --git a/bot/exts/holidays/halloween/scarymovie.py b/bot/exts/holidays/halloween/scarymovie.py
index 74bcef90..9f1a95fd 100644
--- a/bot/exts/holidays/halloween/scarymovie.py
+++ b/bot/exts/holidays/halloween/scarymovie.py
@@ -5,7 +5,7 @@ from discord import Embed
 from discord.ext import commands
 
 from bot.bot import Bot
-from bot.constants import Tokens
+from bot.constants import Colours, NEGATIVE_REPLIES, Tokens
 
 log = logging.getLogger(__name__)
 
@@ -21,6 +21,13 @@ class ScaryMovie(commands.Cog):
         """Randomly select a scary movie and display information about it."""
         async with ctx.typing():
             selection = await self.select_movie()
+            if not selection:
+                await ctx.send(embed=Embed(
+                    title=random.choice(NEGATIVE_REPLIES),
+                    description=":warning: Failed to select a movie from the API",
+                    color=Colours.soft_red
+                ))
+                return
             movie_details = await self.format_metadata(selection)
 
         await ctx.send(embed=movie_details)
@@ -44,10 +51,16 @@ class ScaryMovie(commands.Cog):
             total_pages = data.get("total_pages")
 
         # Get movie details from one random result on a random page
-        params["page"] = random.randint(1, total_pages)
+        params["page"] = random.randint(1, min(total_pages, 500))
         async with self.bot.http_session.get(url=url, params=params, headers=headers) as response:
             data = await response.json()
-            selection_id = random.choice(data.get("results")).get("id")
+            if (results := data.get("results")) is None:
+                log.warning("Failed to select a movie - data returned from API has no 'results' key")
+                return {}
+            selection_id = random.choice(results).get("id")
+            if selection_id is None:
+                log.warning("Failed to select a movie - selected film didn't have an id")
+                return {}
 
         # Get full details and credits
         async with self.bot.http_session.get(
Repository: python-discord/sir-lancebot
Issue: TypeError: Client.wait_for() got some positional-only arguments passed as keyword arguments: 'event'

Sentry Issue: [SIR-LANCEBOT-8M](https://sentry.io/organizations/python-discord/issues/3622038705/?referrer=github_integration)

```
TypeError: Client.wait_for() got some positional-only arguments passed as keyword arguments: 'event'
  File "discord/ext/commands/core.py", line 190, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/exts/fun/hangman.py", line 112, in hangman
    message = await self.bot.wait_for(

Unhandled command error: Client.wait_for() got some positional-only arguments passed as keyword arguments: 'event'
```

Changed files:
bot/exts/fun/madlibs.py, bot/exts/fun/hangman.py

diff --git a/bot/exts/fun/hangman.py b/bot/exts/fun/hangman.py
index 6c4ed69c..f385a955 100644
--- a/bot/exts/fun/hangman.py
+++ b/bot/exts/fun/hangman.py
@@ -110,7 +110,7 @@ class Hangman(commands.Cog):
 
             try:
                 message = await self.bot.wait_for(
-                    event="message",
+                    "message",
                     timeout=60.0,
                     check=check
                 )
diff --git a/bot/exts/fun/madlibs.py b/bot/exts/fun/madlibs.py
index 5f3e0572..075dde75 100644
--- a/bot/exts/fun/madlibs.py
+++ b/bot/exts/fun/madlibs.py
@@ -93,7 +93,7 @@ class Madlibs(commands.Cog):
             await original_message.edit(embed=madlibs_embed)
 
             try:
-                message = await self.bot.wait_for(event="message", check=author_check, timeout=TIMEOUT)
+                message = await self.bot.wait_for("message", check=author_check, timeout=TIMEOUT)
             except TimeoutError:
                 timeout_embed = discord.Embed(
                     title=choice(NEGATIVE_REPLIES),
Repository: python-discord/sir-lancebot
Issue: Epoch Command OverflowError

Sentry Issue: [SIR-LANCEBOT-7N](https://sentry.io/organizations/python-discord/issues/2916603914/?referrer=github_integration)

```
OverflowError: Python int too large to convert to C int
(1 additional frame(s) were not displayed)
...
  File "bot/exts/utilities/epoch.py", line 37, in convert
    return arrow.utcnow().dehumanize(argument)

Unhandled command error: Python int too large to convert to C int
```

The epoch converter raises an overflow error if the value is too big. We should add a try/except. 

Changed files:
bot/exts/utilities/epoch.py

diff --git a/bot/exts/utilities/epoch.py b/bot/exts/utilities/epoch.py
index b9feed18..03758af0 100644
--- a/bot/exts/utilities/epoch.py
+++ b/bot/exts/utilities/epoch.py
@@ -35,7 +35,7 @@ class DateString(commands.Converter):
         """
         try:
             return arrow.utcnow().dehumanize(argument)
-        except ValueError:
+        except (ValueError, OverflowError):
             try:
                 dt, ignored_tokens = parser.parse(argument, fuzzy_with_tokens=True)
             except parser.ParserError:
Repository: python-discord/sir-lancebot
Issue: ExtensionFailed: Extension 'bot.exts.core.source' raised an error: TypeError: can only concatenate tuple (not "lis...

Sentry Issue: [SIR-LANCEBOT-7Z](https://sentry.io/organizations/python-discord/issues/3031672910/?referrer=github_integration)

```
TypeError: can only concatenate tuple (not "list") to tuple
  File "discord/ext/commands/bot.py", line 660, in _load_from_module_spec
    spec.loader.exec_module(lib)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "bot/exts/core/source.py", line 14, in <module>
    class BotSource(commands.Cog):
  File "bot/exts/core/source.py", line 18, in BotSource
    @whitelist_override(channels=WHITELISTED_CHANNELS+[Channels.community_meta, Channels.dev_contrib])

ExtensionFailed: Extension 'bot.exts.core.source' raised an error: TypeError: can only concatenate tuple (not "list") to tuple
  File "runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "__main__.py", line 13, in <module>
    bot.load_extension(ext)
  File "discord/ext/commands/bot.py", line 732, in load_extension
    self._load_from_module_spec(spec, name)
  File "discord/ext/commands/bot.py", line 663, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
```

Changed files:
bot/exts/core/source.py

diff --git a/bot/exts/core/source.py b/bot/exts/core/source.py
index e9568933..2801be0f 100644
--- a/bot/exts/core/source.py
+++ b/bot/exts/core/source.py
@@ -15,7 +15,7 @@ class BotSource(commands.Cog):
     """Displays information about the bot's source code."""
 
     @commands.command(name="source", aliases=("src",))
-    @whitelist_override(channels=WHITELISTED_CHANNELS+[Channels.community_meta, Channels.dev_contrib])
+    @whitelist_override(channels=WHITELISTED_CHANNELS+(Channels.community_meta, Channels.dev_contrib))
     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: