Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate Main Loop #19

Closed
wants to merge 8 commits into from

Conversation

kphoenix137
Copy link
Contributor

Based on: #18
Fixes: #17

@AJenbo
Copy link
Member

AJenbo commented Oct 2, 2023

There are a few small conflicts, could you please resolve them?

@kphoenix137
Copy link
Contributor Author

There are a few small conflicts, could you please resolve them?

Should be all set.

AJenbo
AJenbo previously approved these changes Oct 2, 2023
Copy link
Member

@AJenbo AJenbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this is really exciting!

@AJenbo AJenbo dismissed their stale review October 2, 2023 17:35

Doesn't post the game list after this change

@AJenbo
Copy link
Member

AJenbo commented Oct 2, 2023

Looks like this change causes it to get stuck here:
image

I'll try to debug it a bit alter

discord_bot.py Outdated Show resolved Hide resolved
discord_bot.py Outdated Show resolved Hide resolved
@kphoenix137 kphoenix137 closed this Oct 2, 2023
Comment on lines +301 to +302
loop = asyncio.get_event_loop()
loop.create_task(background_task()) # Run background_task() as a separate task when the client is ready.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to call create_task() on the current event loop, or can we just call the higher-level asyncio.create_task() function? The asyncio documentation suggests that the event loop API calls are low-level functions that typically shouldn't need to be used by applications.

https://docs.python.org/3/library/asyncio-eventloop.html

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no clue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor main bot loop to not be inside of the Discord SDK
3 participants