3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

success emoji now loaded from config

This commit is contained in:
roflmaoqwerty 2020-01-12 22:19:10 +11:00
parent af882627a1
commit b785efe490

View file

@ -75,6 +75,7 @@ import { customArgumentTypes } from "./customArgumentTypes";
import { errorMessage, successMessage } from "./utils";
import { startUptimeCounter } from "./uptime";
import { AllowedGuilds } from "./data/AllowedGuilds";
import { IGuildData } from "knub/dist/Knub";
logger.info("Connecting to database");
connect().then(async conn => {
@ -160,9 +161,10 @@ connect().then(async conn => {
customArgumentTypes,
sendSuccessMessageFn(channel: TextChannel, body) {
let config: IGuildConfig = this.getConfig(channel.guild.id);
channel.createMessage(successMessage(config., body));
sendSuccessMessageFn(channel, body) {
const guildId = channel instanceof TextChannel ? channel.guild.id : null;
const emoji = (guildId ? bot.getGuildData(guildId).config.success_emoji : null) ?? 'default emoji here';
channel.createMessage(successMessage(body, emoji));
},
sendErrorMessageFn(channel, body) {