Skip to content
This repository was archived by the owner on Oct 29, 2021. It is now read-only.

Commit 7431ea9

Browse files
committed
This should do the trick
1 parent cae06ac commit 7431ea9

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

dist/utilsx-v0.3.52.tar.gz

7.05 KB
Binary file not shown.

utilsx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "v0.3.52"
1+
__version__ = "v0.3.53"

utilsx/discord/shorter.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ class BotX(commands.Bot):
99
r"""
1010
Shortens the code to create a bot instance.
1111
12+
Parameters
13+
----------
14+
intent: :class:`discord.Intents`
15+
The discord intents object that will be applied to the bot.
16+
1217
Attributes
1318
-----------
1419
prefix: :class:`Union[str, callable, List[str]]`
@@ -22,16 +27,16 @@ class BotX(commands.Bot):
2227
The discord intents object that will be applied to the bot.
2328
"""
2429

25-
def __init__(self):
30+
def __init__(self, intents=Intents()):
2631
self.prefix = "!"
2732
self.description = "Bot description is unset!\n" \
2833
"Create a description by adding a `self.description = \"Your description\"` in the BotX init"
2934
self.case_insensitive = True
30-
self.intent = Intents()
35+
self.intent = intents
3136

3237
super().__init__(command_prefix=self.get_default_prefix, description=self.get_description(),
3338
help_attrs=dict(hidden=True), case_insensitive=self.get_case_insensitive(),
34-
intents=self.get_intents())
39+
intents=self.intent)
3540

3641
def get_case_insensitive(self) -> bool:
3742
r"""
@@ -45,12 +50,6 @@ def get_description(self) -> str:
4550
"""
4651
return self.description
4752

48-
def get_intents(self) -> Intents:
49-
r"""
50-
Retrieves the bot description.
51-
"""
52-
return self.intent
53-
5453
def get_default_prefix(self, *args, **kwargs) -> str:
5554
r"""
5655
Retrieves the bot prefix.

0 commit comments

Comments
 (0)