mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 16:57:22 +00:00
style: move to deno fmt (#1992)
* Create deno.json * run format * run format * ci: only check formatting * f * Update settings.json * Update settings.json
This commit is contained in:
Vendored
+5
-5
@@ -41,7 +41,7 @@ export function setupCacheEdits<B extends Bot>(bot: BotWithCache<B>) {
|
||||
bot.handlers.MESSAGE_REACTION_ADD = function (_, data, shardId) {
|
||||
const payload = data.d as SnakeCasedPropertiesDeep<MessageReactionAdd>;
|
||||
|
||||
const messageId = bot.transformers.snowflake(payload.message_id)
|
||||
const messageId = bot.transformers.snowflake(payload.message_id);
|
||||
const message = bot.messages.get(messageId);
|
||||
|
||||
const emoji = bot.transformers.emoji(bot, payload.emoji);
|
||||
@@ -71,12 +71,12 @@ export function setupCacheEdits<B extends Bot>(bot: BotWithCache<B>) {
|
||||
}
|
||||
|
||||
MESSAGE_REACTION_ADD(bot, data, shardId);
|
||||
}
|
||||
};
|
||||
|
||||
bot.handlers.MESSAGE_REACTION_REMOVE = function (_, data, shardId) {
|
||||
const payload = data.d as SnakeCasedPropertiesDeep<MessageReactionRemove>;
|
||||
|
||||
const messageId = bot.transformers.snowflake(payload.message_id)
|
||||
const messageId = bot.transformers.snowflake(payload.message_id);
|
||||
const message = bot.messages.get(messageId);
|
||||
|
||||
const emoji = bot.transformers.emoji(bot, payload.emoji);
|
||||
@@ -102,7 +102,7 @@ export function setupCacheEdits<B extends Bot>(bot: BotWithCache<B>) {
|
||||
}
|
||||
|
||||
MESSAGE_REACTION_REMOVE(bot, data, shardId);
|
||||
}
|
||||
};
|
||||
|
||||
bot.handlers.MESSAGE_REACTION_REMOVE_ALL = function (_, data, shardId) {
|
||||
const payload = data.d as SnakeCasedPropertiesDeep<MessageReactionRemoveAll>;
|
||||
@@ -116,5 +116,5 @@ export function setupCacheEdits<B extends Bot>(bot: BotWithCache<B>) {
|
||||
}
|
||||
|
||||
MESSAGE_REACTION_REMOVE_ALL(bot, data, shardId);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
+3
-7
@@ -1,5 +1,5 @@
|
||||
import {
|
||||
Bot,
|
||||
Bot,
|
||||
Channel,
|
||||
Collection,
|
||||
GuildBanAddRemove,
|
||||
@@ -85,18 +85,14 @@ export function setupCacheRemovals<B extends Bot>(bot: BotWithCache<B>) {
|
||||
bot.events.messageDelete(bot, {
|
||||
id,
|
||||
channelId: bot.transformers.snowflake(payload.channel_id),
|
||||
guildId: payload.guild_id
|
||||
? bot.transformers.snowflake(payload.guild_id)
|
||||
: undefined,
|
||||
guildId: payload.guild_id ? bot.transformers.snowflake(payload.guild_id) : undefined,
|
||||
}, message);
|
||||
bot.messages.delete(id);
|
||||
};
|
||||
|
||||
bot.handlers.MESSAGE_DELETE_BULK = function (_, data, shardId) {
|
||||
const payload = data.d as SnakeCasedPropertiesDeep<MessageDeleteBulk>;
|
||||
payload.ids.forEach((id) =>
|
||||
bot.messages.delete(bot.transformers.snowflake(id))
|
||||
);
|
||||
payload.ids.forEach((id) => bot.messages.delete(bot.transformers.snowflake(id)));
|
||||
MESSAGE_DELETE_BULK(bot, data, shardId);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user