mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 22:37:54 +00:00
Merge branch 'new-shard-handler'
This commit is contained in:
commit
41f1c58a9f
24 changed files with 723 additions and 538 deletions
|
|
@ -155,6 +155,7 @@ namespace PluralKit.Bot {
|
|||
// "escape hatch", clean up as if we hit X
|
||||
}
|
||||
|
||||
// todo: re-check
|
||||
if (ctx.BotPermissions.HasFlag(PermissionSet.ManageMessages))
|
||||
await ctx.Rest.DeleteAllReactions(msg.ChannelId, msg.Id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace PluralKit.Bot
|
|||
{"guild", evt.GuildId.ToString()},
|
||||
{"message", evt.Id.ToString()},
|
||||
});
|
||||
scope.SetTag("shard", shard.ShardInfo.ShardId.ToString());
|
||||
scope.SetTag("shard", shard.ShardId.ToString());
|
||||
|
||||
// Also report information about the bot's permissions in the channel
|
||||
// We get a lot of permission errors so this'll be useful for determining problems
|
||||
|
|
@ -55,7 +55,7 @@ namespace PluralKit.Bot
|
|||
{"guild", evt.GuildId.ToString()},
|
||||
{"message", evt.Id.ToString()},
|
||||
});
|
||||
scope.SetTag("shard", shard.ShardInfo.ShardId.ToString());
|
||||
scope.SetTag("shard", shard.ShardId.ToString());
|
||||
}
|
||||
|
||||
public void Enrich(Scope scope, Shard shard, MessageUpdateEvent evt)
|
||||
|
|
@ -67,7 +67,7 @@ namespace PluralKit.Bot
|
|||
{"guild", evt.GuildId.Value.ToString()},
|
||||
{"message", evt.Id.ToString()}
|
||||
});
|
||||
scope.SetTag("shard", shard.ShardInfo.ShardId.ToString());
|
||||
scope.SetTag("shard", shard.ShardId.ToString());
|
||||
}
|
||||
|
||||
public void Enrich(Scope scope, Shard shard, MessageDeleteBulkEvent evt)
|
||||
|
|
@ -79,7 +79,7 @@ namespace PluralKit.Bot
|
|||
{"guild", evt.GuildId.ToString()},
|
||||
{"messages", string.Join(",", evt.Ids)},
|
||||
});
|
||||
scope.SetTag("shard", shard.ShardInfo.ShardId.ToString());
|
||||
scope.SetTag("shard", shard.ShardId.ToString());
|
||||
}
|
||||
|
||||
public void Enrich(Scope scope, Shard shard, MessageReactionAddEvent evt)
|
||||
|
|
@ -93,7 +93,7 @@ namespace PluralKit.Bot
|
|||
{"message", evt.MessageId.ToString()},
|
||||
{"reaction", evt.Emoji.Name}
|
||||
});
|
||||
scope.SetTag("shard", shard.ShardInfo.ShardId.ToString());
|
||||
scope.SetTag("shard", shard.ShardId.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue