Skip to content

Commit ab2d5fd

Browse files
committed
All cogs.
1 parent 90eeb4f commit ab2d5fd

42 files changed

Lines changed: 119 additions & 127 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

autopublisher/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"description": "Automatically publish messages from a news channel.",
88
"short": "Automatically publish messages from a news channel.",
99
"hidden": false,
10-
"min_bot_version": "3.5.21",
10+
"min_bot_version": "3.5.24",
1111
"tags": [
1212
"news",
1313
"autopublish",

counting/commands/admin.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import asyncio
2626
import re
2727
from enum import Enum
28-
from typing import Optional
2928

3029
import discord
3130
import emoji
@@ -58,7 +57,7 @@ async def countingset(self, ctx: commands.Context) -> None:
5857

5958
@countingset.command(name="channel")
6059
async def set_channel(
61-
self, ctx: commands.Context, channel: Optional[discord.TextChannel] = None
60+
self, ctx: commands.Context, channel: discord.TextChannel | None = None
6261
) -> None:
6362
"""Set or clear the counting channel."""
6463
if not channel:
@@ -181,8 +180,8 @@ async def countingset_roles(self, ctx: commands.Context) -> None:
181180
async def set_ruinrole(
182181
self,
183182
ctx: commands.Context,
184-
role: Optional[discord.Role] = None,
185-
duration: Optional[str] = None,
183+
role: discord.Role | None = None,
184+
duration: str | None = None,
186185
) -> None:
187186
"""
188187
Set or clear the role assigned for ruining the count, with an optional temporary duration.

counting/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"description": "Count from 1 to infinity! with some customizable settings.",
88
"short": "Count from 1 to infinity! with some customizable settings.",
99
"hidden": false,
10-
"min_bot_version": "3.5.13",
10+
"min_bot_version": "3.5.24",
1111
"tags": [
1212
"counting",
1313
"count"

currency/info.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"description": "A cog to convert currencies using ExchangeRate-API.",
88
"short": "A cog to convert currencies using ExchangeRate-API.",
99
"hidden": false,
10-
"min_bot_version": "3.5.13",
10+
"min_bot_version": "3.5.24",
1111
"tags": [
1212
"currency",
1313
"convert currency"
@@ -16,7 +16,7 @@
1616
"requirements": [],
1717
"min_python_version": [
1818
3,
19-
9,
19+
10,
2020
0
2121
],
2222
"end_user_data_statement": "This cog does not store any End User Data.",

earthquake/earthquake.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import asyncio
2626
import datetime
27-
from typing import Final, Optional
27+
from typing import Final
2828

2929
import aiohttp
3030
import discord
@@ -186,7 +186,7 @@ async def earthquake_check(self):
186186

187187
async def get_or_create_webhook(
188188
self, channel: discord.TextChannel
189-
) -> Optional[discord.Webhook]:
189+
) -> discord.Webhook | None:
190190
"""Get or create a webhook for earthquake alerts in the channel."""
191191
our_name = "Earthquake Alert Webhook"
192192
try:
@@ -358,7 +358,7 @@ async def set_webhook(self, ctx: commands.Context, use_webhook: bool):
358358
await ctx.send(f"Webhook usage for earthquake alerts has been {status}.")
359359

360360
@earthquakeset.command(name="channel")
361-
async def set_channel(self, ctx: commands.Context, channel: Optional[discord.TextChannel]):
361+
async def set_channel(self, ctx: commands.Context, channel: discord.TextChannel | None):
362362
"""Set or clear the channel for earthquake alerts."""
363363
if channel:
364364
if (
@@ -376,7 +376,7 @@ async def set_channel(self, ctx: commands.Context, channel: Optional[discord.Tex
376376

377377
@earthquakeset.command(name="role")
378378
@commands.bot_has_permissions(manage_roles=True)
379-
async def set_role(self, ctx: commands.Context, role: Optional[discord.Role]):
379+
async def set_role(self, ctx: commands.Context, role: discord.Role | None):
380380
"""Set or clear the role to ping for earthquake alerts."""
381381
if role:
382382
if role >= ctx.guild.me.top_role:
@@ -411,7 +411,7 @@ async def set_magnitude(
411411
)
412412

413413
@earthquakeset.command(name="safety")
414-
async def set_safety_message(self, ctx: commands.Context, *, message: Optional[str] = None):
414+
async def set_safety_message(self, ctx: commands.Context, *, message: str | None = None):
415415
"""Set or clear a custom safety message for alerts."""
416416
if message:
417417
if message and len(message) > 1024:

earthquake/info.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"description": "Posts live worldwide earthquake updates from USGS to a designated channel.",
88
"short": "Posts live worldwide earthquake updates from USGS to a designated channel.",
99
"hidden": false,
10-
"min_bot_version": "3.5.13",
10+
"min_bot_version": "3.5.24",
1111
"tags": [
1212
"Earthquake",
1313
"USGS",
@@ -21,7 +21,7 @@
2121
"requirements": ["tenacity"],
2222
"min_python_version": [
2323
3,
24-
9,
24+
10,
2525
0
2626
],
2727
"end_user_data_statement": "This cog does not store any End User Data.",

easterhunt/commands/user.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import random
2828
import time
2929
from datetime import datetime, timedelta
30-
from typing import Optional
3130

3231
import discord
3332
from red_commons.logging import getLogger
@@ -238,7 +237,7 @@ async def progress(self, ctx: commands.Context):
238237

239238
@easterhunt.command(aliases=["inv", "view", "views"])
240239
@commands.bot_has_permissions(embed_links=True)
241-
async def inventory(self, ctx: commands.Context, member: Optional[discord.Member] = None):
240+
async def inventory(self, ctx: commands.Context, member: discord.Member | None = None):
242241
"""Check your Easter haul!"""
243242
if not member:
244243
member = ctx.author
@@ -280,7 +279,7 @@ async def inventory(self, ctx: commands.Context, member: Optional[discord.Member
280279

281280
@easterhunt.command(aliases=["achievement"])
282281
@commands.bot_has_permissions(embed_links=True)
283-
async def achievements(self, ctx: commands.Context, member: Optional[discord.Member] = None):
282+
async def achievements(self, ctx: commands.Context, member: discord.Member | None = None):
284283
"""
285284
Check if you've completed any Easter Hunt!
286285

easterhunt/db.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import contextlib
2626
import json
2727
import random
28-
from typing import Optional
2928

3029
import aiosqlite
3130
import discord
@@ -167,7 +166,7 @@ async def get_egg_images(self) -> dict[str, str]:
167166
rows = await cursor.fetchall()
168167
return {row[0]: row[1] for row in rows if row[1] is not None}
169168

170-
async def set_egg_image(self, egg_type: str, url: Optional[str]):
169+
async def set_egg_image(self, egg_type: str, url: str | None):
171170
async with self.conn.cursor() as cursor:
172171
if url is None:
173172
await cursor.execute("DELETE FROM egg_images WHERE egg_type = ?", (egg_type,))
@@ -216,7 +215,7 @@ async def get_leaderboard_data(self) -> list[tuple[int, int]]:
216215

217216
async def find_target_player(
218217
self, user_id: int, guild
219-
) -> tuple[Optional[discord.Member], Optional[str]]:
218+
) -> tuple[discord.Member | None, str | None]:
220219
"""Find a random guild member with eggs to steal from, excluding the requesting user."""
221220
potential_targets = []
222221
async with self.conn.cursor() as cursor:

easterhunt/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"description": "Easter hunt cog that provides a fun Easter-themed game where users can hunt for eggs, work for egg shards, give eggs to others or steal, and earn achievements.",
88
"short": "Easter hunt cog that provides a fun Easter-themed game where users can hunt for eggs, work for egg shards, give eggs to others or steal, and earn achievements.",
99
"hidden": false,
10-
"min_bot_version": "3.5.21",
10+
"min_bot_version": "3.5.24",
1111
"tags": [
1212
"easter",
1313
"hunting",

enforce/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"requirements": [],
2222
"min_python_version": [
2323
3,
24-
9,
24+
10,
2525
0
2626
],
2727
"end_user_data_statement": "This cog does not store any End User Data.",

0 commit comments

Comments
 (0)