Skip to content

Commit

Permalink
fix: Unknown guild when destroy him
Browse files Browse the repository at this point in the history
  • Loading branch information
LeadcodeDev committed Mar 26, 2023
1 parent 540c83a commit a20af67
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/src/internal/websockets/packets/guild_remove_packet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ class GuildRemovePacket with Container implements WebsocketPacket {
EventService eventService = container.use<EventService>();
MineralClient client = container.use<MineralClient>();

dynamic payload = websocketResponse.payload;

Guild? guild = client.guilds.cache.getOrFail(payload['guild_id']);
Guild guild = client.guilds.cache.getOrFail(websocketResponse.payload['id']);

eventService.controller.add(GuildDeleteEvent(guild));
client.guilds.cache.remove(guild.id);
Expand Down

0 comments on commit a20af67

Please sign in to comment.