Archived
system messages implementation
This commit is contained in:
1 parent
83cf65c3b8
commit
15be754d3c
3 files changed
+18
-7
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { ColorResolvable, GuildMember, MessageEmbed, TextChannel, User } from 'discord.js';
|
||||
import { ColorResolvable, DMChannel, GuildMember, MessageEmbed, NewsChannel, TextChannel, User } from 'discord.js';
|
||||
import { Command, PermissionsError } from './Command.js';
|
||||
|
||||
type MessageType = 'PERMISSION' | 'ERROR' | 'NOT_FOUND';
|
||||
@@ -42,7 +42,7 @@ class SystemMessageManager {
|
||||
}
|
||||
this.deleteTimeout = Infinity;
|
||||
}
|
||||
async send(type: MessageType, data?: SystemMessageData, channel?: TextChannel) : Promise<MessageEmbed | void> {
|
||||
async send(type: MessageType, data?: SystemMessageData, channel?: TextChannel | DMChannel | NewsChannel) : Promise<MessageEmbed | void> {
|
||||
if(this[type]) {
|
||||
const embed = new MessageEmbed();
|
||||
embed.setTitle(this[type].title);
|
||||
|
||||
Reference in new issue
Block a user