2023-08-29 20:21:53 -04:00
|
|
|
import Discord from 'discord.js';
|
|
|
|
|
|
|
|
export default class MessageTool {
|
2023-08-29 20:34:22 -04:00
|
|
|
static embedMusic(color:Discord.ColorResolvable, title:string, thumbnail?:string, footer?:string){
|
|
|
|
const embed = new Discord.EmbedBuilder().setColor(color).setTitle(title);
|
|
|
|
if (thumbnail) embed.setThumbnail(thumbnail);
|
|
|
|
if (footer) embed.setFooter({text: footer});
|
|
|
|
return embed
|
|
|
|
}
|
2023-08-29 20:21:53 -04:00
|
|
|
static embedStruct(color:Discord.ColorResolvable, title:string, description?:string|null, image?:string|null){
|
|
|
|
const embed = new Discord.EmbedBuilder().setColor(color).setTitle(title);
|
|
|
|
if (description) embed.setDescription(description);
|
|
|
|
if (image) embed.setImage(image);
|
|
|
|
return embed
|
|
|
|
}
|
|
|
|
static concatMessage(...messages:string[]){
|
|
|
|
return messages.join('\n')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// I want to come up with better name instead of calling this file "MessageTool", but I am super bad at naming things.
|