Skip to content

Commit

Permalink
doc: improve documentation on Base
Browse files Browse the repository at this point in the history
  • Loading branch information
Skelmis committed Nov 25, 2022
1 parent 7eea22b commit 5db5b89
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions antispam/libs/shared/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def check_if_message_is_from_a_bot(self, message) -> bool:
-------
bool
True if the message is from a bot else false
Warnings
--------
Lib classes must implement this.
"""
raise NotImplementedError

Expand All @@ -51,6 +55,10 @@ async def does_author_have_kick_and_ban_perms(self, message) -> bool:
-------
bool
True if the author has them else False
Warnings
--------
Lib classes must implement this.
"""
raise NotImplementedError

Expand All @@ -68,6 +76,10 @@ def get_guild_id_from_message(self, message) -> Optional[int]:
The guild's id
None
This message is not in a guild
Warnings
--------
Lib classes must implement this.
"""
raise NotImplementedError

Expand All @@ -83,6 +95,10 @@ def get_author_id_from_message(self, message) -> int:
-------
int
The author's id
Warnings
--------
Lib classes must implement this.
"""
raise NotImplementedError

Expand All @@ -98,6 +114,10 @@ def get_author_name_from_message(self, message) -> str:
-------
str
The author's name
Warnings
--------
Lib classes must implement this.
"""
raise NotImplementedError

Expand All @@ -113,6 +133,10 @@ def get_bot_id_from_message(self, message) -> int:
-------
int
The bot's id
Warnings
--------
Lib classes must implement this.
"""
raise NotImplementedError

Expand All @@ -128,6 +152,10 @@ def get_message_id_from_message(self, message) -> int:
-------
int
The message id
Warnings
--------
Lib classes must implement this.
"""
raise NotImplementedError

Expand All @@ -143,6 +171,10 @@ def get_channel_id_from_message(self, message) -> int:
-------
int
The channel id
Warnings
--------
Lib classes must implement this.
"""
raise NotImplementedError

Expand All @@ -158,13 +190,21 @@ def get_role_ids_for_message_author(self, message) -> List[int]:
-------
List[int]
A list of role ids, empty list if you can't get any
Warnings
--------
Lib classes must implement this.
"""
raise NotImplementedError

def get_expected_message_type(self):
"""Return the expected type of your libraries message.
I.e. discord.Message
Warnings
--------
Lib classes must implement this.
"""
raise NotImplementedError

Expand Down

0 comments on commit 5db5b89

Please sign in to comment.