Skip to content

Discord.py @tasks.loop equivalent? #434

Answered by andersfylling
vinicius507 asked this question in Q&A
Discussion options

You must be logged in to vote

in python this is just coroutines scheduling if I'm correctly understanding you. Disgord allows you to register a channel for each event type, you can then have a goroutine dedicated for each to process events: https://pkg.go.dev/github.com/andersfylling/disgord#hdr-Listen_for_events_using_Channels

outdated docs here (the client.On method no longer exists so you'd use client.Gateway().*Chan(...) instead):
https://github.com/andersfylling/disgord/blob/master/docs/examples/listen-for-messages.md

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@vinicius507
Comment options

@andersfylling
Comment options

@vinicius507
Comment options

Answer selected by vinicius507
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants