What is the event name for when vanity gets updated?

i tried looking into guildUpdate but it's not there
Solution:
You could fetch the audit log in the guildUpdateEvent Or you could use the auditlog event...
Jump to solution
25 Replies
Favna
Favna12mo ago
This is a DiscordJS question, not a Sapphire question. It should be on guildUpdate. You're better off asking this in the DiscordJS server discord.gg/djs
untitled.
untitled.OP12mo ago
i'm banned from that server. it's not in guildUpdate though
Favna
Favna12mo ago
Maybe you should've behaved better then kekw
untitled.
untitled.OP12mo ago
ngl no
Favna
Favna12mo ago
there is no other event that it can be on, refer to https://discord.js.org/docs/packages/discord.js/14.14.1/Client:Class
discord.js | Client
The main hub for interacting with the Discord API, and the starting point for any bot.
untitled.
untitled.OP12mo ago
i got banned bceuse like uh
Favna
Favna12mo ago
"political harassment in support" yes
untitled.
untitled.OP12mo ago
wait whast political harrasment? LOL
Favna
Favna12mo ago
news flash, all the devs in this server are also staff or proficient (in my particular case) in DJS so we have access to mod logs
untitled.
untitled.OP12mo ago
do they have the message log of me politcally harrrasing someone
Favna
Favna12mo ago
shrug. Maybe. I couldn't be bothered to look it up though. Anyway lets get back to the topic.
untitled.
untitled.OP12mo ago
i tried making it return both old and new guild but i think the newguild doesn't exist
untitled.
untitled.OP12mo ago
yep, undefined
import { Listener } from '@sapphire/framework';
import { ActivityType, Guild, type Client } from 'discord.js';

export class guildUpdate extends Listener {
public run(client: Client, guild: Guild, newGuild: Guild) {
console.log(guild)
console.log(newGuild)
}
}
import { Listener } from '@sapphire/framework';
import { ActivityType, Guild, type Client } from 'discord.js';

export class guildUpdate extends Listener {
public run(client: Client, guild: Guild, newGuild: Guild) {
console.log(guild)
console.log(newGuild)
}
}
Favna
Favna12mo ago
yeah that's wrong. There is no client as first parameter. Not sure what you're basing that on. The first parameter is the old guild and the second new guild. The match 1:1 with the DJS documentation: https://discord.js.org/docs/packages/discord.js/14.14.1/Client:Class#guildUpdate
discord.js | Client
The main hub for interacting with the Discord API, and the starting point for any bot.
untitled.
untitled.OP12mo ago
oh yea
Favna
Favna12mo ago
to get access to the client in Sapphire you use this.container.client
untitled.
untitled.OP12mo ago
yea can i see who updated the guild?
Favna
Favna12mo ago
Nope, Discord API doesn't expose that on that event. But you can use guildAuditLogEntryCreate though as being a separate event you may run into race conditions so better not
untitled.
untitled.OP12mo ago
how do wick do it tho they have a system where you update something they strip your roles and stuff if i'm not wrong
Favna
Favna12mo ago
idk what bot Wick is
untitled.
untitled.OP12mo ago
that one antiraid bot
Favna
Favna12mo ago
never heard of it anti raid is also built into Discord anyway so bots for it aren't needed anymore
Solution
KaydaFox
KaydaFox12mo ago
You could fetch the audit log in the guildUpdateEvent Or you could use the auditlog event
untitled.
untitled.OP12mo ago
will try
Want results from more Discord servers?
Add your server