Synchronize scheduled events on sch. events tick (#129)
Because the Discord API sucks at providing data when needed, this PR makes it so that events are synchronized every tick instead of on gateway events. This fixes an issue where the bot won't know about a scheduled event if it was created before the bot was started
This commit is contained in:
parent
804bcd6e68
commit
5d278883d5
3 changed files with 16 additions and 35 deletions
|
@ -54,8 +54,6 @@ public class GuildLoadedResponder : IResponder<IGuildCreate>
|
|||
{
|
||||
if (!data.ScheduledEvents.TryGetValue(schEvent.ID.Value, out var eventData))
|
||||
{
|
||||
data.ScheduledEvents.Add(schEvent.ID.Value, new ScheduledEventData(schEvent.ID.Value,
|
||||
schEvent.Name, schEvent.ScheduledStartTime, schEvent.Status));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue