Skip to content

Commit e992b8a

Browse files
committed
resolve typings and structure
1 parent f73c704 commit e992b8a

File tree

6 files changed

+69
-358
lines changed

6 files changed

+69
-358
lines changed

core/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""MIT License
22
3-
Copyright (c) 2020 - Current PythonistaGuild
3+
Copyright (c) 2021 - Present PythonistaGuild
44
55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -22,6 +22,7 @@
2222
"""
2323
import toml
2424

25+
2526
__all__ = ("CONFIG",)
2627

2728
with open("config.toml", "r") as fp:

core/context.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import discord
66
from discord.ext import commands
7+
78
from constants import GUILD_ID, Roles
89

910

@@ -20,8 +21,6 @@
2021

2122

2223
class Context(commands.Context["Bot"]):
23-
bot: Bot
24-
2524
def author_is_mod(self) -> bool:
2625
member: discord.Member
2726
if self.guild is None: # dms
@@ -39,17 +38,9 @@ def author_is_mod(self) -> bool:
3938
else:
4039
member = self.author # type: ignore
4140

42-
roles = member._roles
41+
roles = member._roles # type: ignore # we know this won't change for a while
4342
return roles.has(Roles.ADMIN) or roles.has(Roles.MODERATOR)
4443

45-
@discord.utils.copy_doc(commands.Context.reply)
46-
async def reply(self, content: str, **kwargs) -> discord.Message:
47-
if "mention_author" not in kwargs:
48-
kwargs["mention_author"] = False
49-
50-
return await super().reply(content, **kwargs)
51-
52-
5344

5445
class GuildContext(Context):
5546
guild: discord.Guild # type: ignore # type lie due to narrowing

core/paginator.py

Lines changed: 0 additions & 304 deletions
This file was deleted.

0 commit comments

Comments
 (0)