/[sudobot]/branches/9.x-dev/extensions/antirickroll/src/events/message/MessageUpdateEvent.ts
ViewVC logotype

Contents of /branches/9.x-dev/extensions/antirickroll/src/events/message/MessageUpdateEvent.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 577 - (show annotations)
Mon Jul 29 18:52:37 2024 UTC (8 months, 1 week ago) by rakinar2
File MIME type: application/typescript
File size: 644 byte(s)
chore: add old version archive branches (2.x to 9.x-dev)
1 import EventListener from "@sudobot/core/EventListener";
2 import { Events } from "@sudobot/types/ClientEvents";
3 import { Message } from "discord.js";
4 import type AntiRickRollService from "../../services/AntiRickRollService";
5
6 export default class MessageUpdateEvent extends EventListener<Events.MessageUpdate> {
7 public readonly name = Events.MessageUpdate;
8
9 async execute(oldMessage: Message, newMessage: Message) {
10 if (newMessage.author.bot || oldMessage.content === newMessage.content) {
11 return;
12 }
13
14 this.client.getService<AntiRickRollService>("antiRickRollService").scanMessage(newMessage);
15 }
16 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26