-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Make websocket package optional
That way it only needs to be imported when actually using the bot functionality
- Loading branch information
1 parent
7b13d75
commit 1786bf4
Showing
1 changed file
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1786bf4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing is, you actually can use the bot way without websockets if you're reusing bot tokens... It might be useful to move the websocket check into
DiscordAction.initialize_gateway
1786bf4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this is true I do not want the action to fail after running for 2 weeks, but actually I want it to fail right away so that it can be handled with in the beginning when creating your pastepwn "config".
I will think about this and maybe add only a warning in the
__init__
and move the exception into theDiscordAction.initialize_gateway
method as you suggested.