@@ -34,7 +34,7 @@ def load_token() -> None:
34
34
35
35
def validate_token () -> bool :
36
36
"""
37
- Checks whether the token is valid or not .
37
+ Checks for a valid token .
38
38
39
39
Returns:
40
40
bool: True if the token is valid, False otherwise.
@@ -71,7 +71,7 @@ def validate_token() -> bool:
71
71
72
72
def get_messages (channel_id : int , limit : int = 100 ) -> dict [int , list ]:
73
73
"""
74
- Retrives messages from a specified channel.
74
+ Retrives messages from the specified channel.
75
75
76
76
Args:
77
77
channel_id (int): A channel ID.
@@ -113,7 +113,7 @@ def get_messages(channel_id: int, limit: int = 100) -> dict[int, list]:
113
113
114
114
def send_message (msg , channel ) -> None :
115
115
"""
116
- Sends a message to a given channel.
116
+ Sends a message to the specified channel.
117
117
118
118
Args:
119
119
msg (str): The message to send.
@@ -132,10 +132,10 @@ def send_message(msg, channel) -> None:
132
132
133
133
def get_friends () -> list [DiscordFriend ]:
134
134
"""
135
- Returns the list of friends of the current user.
135
+ Returns the current user's friends .
136
136
137
137
Returns:
138
- list: The friends of the current user.
138
+ list: The current user's friends .
139
139
"""
140
140
141
141
r = requests .get (f"{ api_base } /users/@me/relationships" , headers = headers )
@@ -148,7 +148,7 @@ def get_channel_from_id(user_id: int) -> DiscordChannel:
148
148
Get the DM channel for a user.
149
149
150
150
Args:
151
- user_id (int): A user ID.
151
+ user_id (int): The user's ID.
152
152
153
153
Returns:
154
154
DiscordChannel: The user's DM channel.
@@ -167,7 +167,7 @@ def get_guilds() -> list[DiscordGuild]:
167
167
Returns all the guilds (aka servers) the current user is in.
168
168
169
169
Returns:
170
- list[DiscordGuild]: Guilds the current user is in .
170
+ list[DiscordGuild]: The user's guilds .
171
171
"""
172
172
173
173
r = requests .get (f"{ api_base } /users/@me/guilds" , headers = headers )
@@ -180,7 +180,7 @@ def get_guild_channels(guild_id: int) -> list[DiscordChannel]:
180
180
Returns all channels in a guild.
181
181
182
182
Args:
183
- guild_id (int): The ID of a guild the current user is in .
183
+ guild_id (int): The guild's ID .
184
184
185
185
Returns:
186
186
list[DiscordChannel]: The channels in the guild.
@@ -247,7 +247,7 @@ def send_typing(channel: int) -> None:
247
247
Sends a typing indicator to a channel.
248
248
249
249
Args:
250
- channel (int): The discord channel to send the typing indicator to
250
+ channel (int): The channel to send the typing indicator
251
251
252
252
Returns:
253
253
None
0 commit comments