Add settings emojis
This commit is contained in:
parent
f8d029431f
commit
7be72df267
@ -3,6 +3,7 @@ import getDefaultEmbed, { getSuccessEmbed } from "../tools/defaultEmbeds";
|
|||||||
import { database, GuildSetting } from "../data";
|
import { database, GuildSetting } from "../data";
|
||||||
import { getGuildSetting } from "../tools/data";
|
import { getGuildSetting } from "../tools/data";
|
||||||
import { getGuildChannel } from "../tools/discord";
|
import { getGuildChannel } from "../tools/discord";
|
||||||
|
import { Emoji } from "../tools/design";
|
||||||
|
|
||||||
const builder = new SlashCommandBuilder();
|
const builder = new SlashCommandBuilder();
|
||||||
builder.setName("logchannel");
|
builder.setName("logchannel");
|
||||||
@ -57,7 +58,7 @@ const execute = async (interaction: ChatInputCommandInteraction) => {
|
|||||||
if (guildSetting.notificationChannelID) {
|
if (guildSetting.notificationChannelID) {
|
||||||
const oldLogChannel = await getGuildChannel(guildSetting.id, guildSetting.notificationChannelID);
|
const oldLogChannel = await getGuildChannel(guildSetting.id, guildSetting.notificationChannelID);
|
||||||
const embed = getDefaultEmbed();
|
const embed = getDefaultEmbed();
|
||||||
embed.setTitle("Settings changed");
|
embed.setTitle(`${Emoji.SETTINGS} Settings changed`);
|
||||||
embed.setDescription(`Log channel has been switched to <#${channel.id}>`);
|
embed.setDescription(`Log channel has been switched to <#${channel.id}>`);
|
||||||
embed.addFields({
|
embed.addFields({
|
||||||
name: "This action was performed by",
|
name: "This action was performed by",
|
||||||
@ -75,7 +76,7 @@ const execute = async (interaction: ChatInputCommandInteraction) => {
|
|||||||
await database.getRepository(GuildSetting).save(guildSetting);
|
await database.getRepository(GuildSetting).save(guildSetting);
|
||||||
|
|
||||||
const embed = getDefaultEmbed();
|
const embed = getDefaultEmbed();
|
||||||
embed.setTitle("Settings changed");
|
embed.setTitle(`${Emoji.SETTINGS} Settings changed`);
|
||||||
embed.setDescription("This channel has been set as the log channel");
|
embed.setDescription("This channel has been set as the log channel");
|
||||||
embed.addFields({
|
embed.addFields({
|
||||||
name: "This action was performed by",
|
name: "This action was performed by",
|
||||||
|
Loading…
Reference in New Issue
Block a user