mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
chore: clean up unnecessary cache.get ?? fetch
This commit is contained in:
parent
dcc8dbb615
commit
66b93dd31c
1 changed files with 2 additions and 6 deletions
|
@ -13,12 +13,8 @@ export async function runAutomodOnMessage(
|
|||
message: SavedMessage,
|
||||
isEdit: boolean,
|
||||
) {
|
||||
const member =
|
||||
pluginData.guild.members.cache.get(message.user_id) ??
|
||||
(await pluginData.guild.members.fetch(message.user_id).catch(() => undefined));
|
||||
const user =
|
||||
pluginData.client.users.cache.get(message.user_id) ??
|
||||
(await pluginData.client.users.fetch(message.user_id).catch(() => undefined));
|
||||
const member = await pluginData.guild.members.fetch(message.user_id).catch(() => undefined);
|
||||
const user = await pluginData.client.users.fetch(message.user_id).catch(() => undefined);
|
||||
|
||||
const context: AutomodContext = {
|
||||
timestamp: moment.utc(message.posted_at).valueOf(),
|
||||
|
|
Loading…
Add table
Reference in a new issue