#messageUpdate event not Triggering

1 messages · Page 1 of 1 (latest)

brisk bolt
#
import { Listener } from '@sapphire/framework';
import type { Message } from 'discord.js';
export class roleDeleteListner extends Listener {
    public constructor(context: Listener.Context, options: Listener.Options) {
        super(context, {
          ...options,
          once: false,
          event: 'messageUpdate'
        });
      }
    
  public async run(oldMessage: Message, newMessage: Message) {
    console.log('Audit log created!, type: messageUpdate')
  }
}```
wide plinthBOT
#

@brisk bolt to help others find answers, you can mark your question as solved via Right Click Solution Message->Apps->✅ Mark Solution

delicate ferry
#

make sure you have the proper intents.

brisk bolt
#

ohh

#

are these enough

delicate ferry
#

probably too much for your particular bot but otherwise yes

brisk bolt
#

but the event not triggering

opaque widget
#

What are your partials as well

#

And also import type { Event }from framework and do Event.MessageUpdate so you don’t always have to change that if it’s changed to smth else again

#

Depending on your version

#

v13 uses 'messageUpdate', I think v14 uses 'MessageUpdate' so some of those could be changed

#

Although I don’t think that would cause it and ts should tell you if there’s smth wrong

#

But yeah try adding these partials and see what happens

tulip quail
#

I believe you're thinking about the enum