Updated template literal strings
This commit is contained in:
@@ -2,7 +2,7 @@ import { SlashCommandBuilder } from "discord.js"
|
||||
import { ICommand } from "interfaces"
|
||||
import { devMessage, embedColor } from "config/options"
|
||||
import { anilist } from "anilist"
|
||||
import { capitalizeFirstLetter } from "utils/functions/funcs"
|
||||
import { capitalizeFirstLetter, removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "anime",
|
||||
@@ -66,7 +66,7 @@ export = {
|
||||
embeds: [{
|
||||
title: romaji + " | " + english,
|
||||
url: anime.siteUrl || "",
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
**Description:** ${animeDescription}
|
||||
|
||||
**Genres:** ${anime.genres.join(", ")}
|
||||
@@ -76,7 +76,7 @@ export = {
|
||||
**Season:** ${animeSeason}
|
||||
**Start Date:** ${animeStartDate}
|
||||
**End Date:** ${animeEndDate}
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: anime.coverImage?.medium || ""
|
||||
|
||||
@@ -3,6 +3,7 @@ import { admin, helper } from "config/roles"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { ICommand } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "ban",
|
||||
@@ -101,12 +102,12 @@ export = {
|
||||
icon_url: mod.user.avatarURL() || undefined
|
||||
},
|
||||
title: "Member Banned",
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
**User:** ${userMention(member.user.id)}
|
||||
**Mod:** ${userMention(mod.user.id)}
|
||||
**Reason:** ${reason}
|
||||
**Messages Deleted:** ${messageDeletionDays} days
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.user.avatarURL() || ""
|
||||
|
||||
@@ -3,6 +3,7 @@ import { ICommand } from "interfaces"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import os from "os"
|
||||
import { execSync } from "child_process"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
const { dependencies, devDependencies } = require("../../package.json")
|
||||
|
||||
export = {
|
||||
@@ -42,7 +43,7 @@ export = {
|
||||
await interaction.reply({
|
||||
embeds: [{
|
||||
title: "Bot Info",
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
__**Bot**__
|
||||
> **Name**: \`${client.user!.username}\`
|
||||
> **ID**: \`${client.user!.id}\`
|
||||
@@ -63,7 +64,7 @@ export = {
|
||||
> **Channels:** \`${client.channels.cache.size}\`
|
||||
> **Users:** \`${client.users.cache.size}\`
|
||||
> **Roles:** \`${client.guilds.cache.reduce((a, b) => a + b.roles.cache.size, 0)}\`
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
thumbnail: {
|
||||
url: client.user!.avatarURL() || "",
|
||||
},
|
||||
|
||||
@@ -2,6 +2,7 @@ import { SlashCommandBuilder, PermissionFlagsBits, TextChannel, channelMention,
|
||||
import { embedColor } from "config/options"
|
||||
import { ICommand } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "clear",
|
||||
@@ -52,11 +53,11 @@ export = {
|
||||
icon_url: interaction.user.avatarURL() || undefined
|
||||
},
|
||||
title: "Messages Cleared",
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
**Channel:** ${channelMention(channel.id)}
|
||||
**Amount:** \`${messages.size}\` messages
|
||||
**Mod:** ${userMention(interaction.user.id)}
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: interaction.user.avatarURL() || ""
|
||||
|
||||
@@ -5,6 +5,7 @@ import { ICommand } from "interfaces"
|
||||
import roleManage from "utils/functions/rolesmanage"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
import { getIGN } from "utils/Hypixel"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "forceunverify",
|
||||
@@ -56,12 +57,12 @@ export = {
|
||||
name: mod.username,
|
||||
icon_url: mod.avatarURL() || undefined
|
||||
},
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
**User:** ${userMention(member.user.id)}
|
||||
**Mod:** ${userMention(mod.id)}
|
||||
**IGN:** \`${ign}\`
|
||||
**UUID:** \`${uuid}\`
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.avatarURL() || ""
|
||||
|
||||
@@ -5,6 +5,7 @@ import verify from "schemas/verifySchema"
|
||||
import { ICommand } from "interfaces"
|
||||
import roleManage from "utils/functions/rolesmanage"
|
||||
import { waitingListRole } from "config/roles"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "forceupdate",
|
||||
@@ -84,11 +85,11 @@ export = {
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
${usermentioned} was given the \`Default Member\` role.
|
||||
|
||||
IGN: \`${ign}\`
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!
|
||||
@@ -158,11 +159,11 @@ export = {
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
${usermentioned} was given the \`${replyRank}\` role.
|
||||
|
||||
IGN: \`${ign}\`
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!
|
||||
|
||||
@@ -6,6 +6,7 @@ import mongoose from "mongoose"
|
||||
import roleManage from "utils/functions/rolesmanage"
|
||||
import { ICommand } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "forceverify",
|
||||
@@ -174,12 +175,12 @@ export = {
|
||||
icon_url: mod.avatarURL() || undefined
|
||||
},
|
||||
title: "Force Verified",
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
**User:** ${userMention(user.id)}
|
||||
**Mod:** ${userMention(mod.id)}
|
||||
**IGN:** \`${player.displayname}\`
|
||||
**UUID:** \`${uuid}\`
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.avatarURL() || ""
|
||||
|
||||
@@ -3,6 +3,7 @@ import { admin, helper } from "config/roles"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { ICommand } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "kick",
|
||||
@@ -75,11 +76,11 @@ export = {
|
||||
icon_url: mod.user.avatarURL() || undefined
|
||||
},
|
||||
title: "Member Kicked",
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
**User:** ${userMention(member.user.id)}
|
||||
**Mod:** ${userMention(mod.user.id)}
|
||||
**Reason:** ${reason}
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.user.avatarURL() || ""
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { embedColor } from "config/options"
|
||||
import { useMainPlayer } from "discord-player"
|
||||
import { ChatInputCommandInteraction } from "discord.js"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export default async function nowplaying(interaction: ChatInputCommandInteraction) {
|
||||
await interaction.deferReply()
|
||||
@@ -41,11 +42,11 @@ export default async function nowplaying(interaction: ChatInputCommandInteractio
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
title: "Now Playing",
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
[${current.title}](${current.url})
|
||||
|
||||
${progressBar}
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: current.thumbnail
|
||||
|
||||
@@ -4,6 +4,7 @@ import waitinglistSchema from "schemas/waitinglistSchema"
|
||||
import { ICommand } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
import { waitingListRole } from "config/roles"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "remove",
|
||||
@@ -57,11 +58,11 @@ export = {
|
||||
icon_url: mod.avatarURL() || undefined
|
||||
},
|
||||
title: "Waiting List - Remove User",
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
**User:** ${userMention(member.user.id)}
|
||||
**Reason:** ${reason}
|
||||
**Mod:** ${userMention(mod.id)}
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.avatarURL() || ""
|
||||
|
||||
@@ -2,6 +2,7 @@ import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } fr
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { ICommand } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "setnick",
|
||||
@@ -48,11 +49,11 @@ export = {
|
||||
icon_url: interaction.user.avatarURL() || undefined
|
||||
},
|
||||
title: "Nickname",
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
**User:** ${userMention(member.id)}
|
||||
**Nickname:** ${nickname}
|
||||
**Moderator:** ${userMention(interaction.user.id)}
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: interaction.user.avatarURL() || ""
|
||||
|
||||
@@ -2,6 +2,7 @@ import { SlashCommandBuilder, PermissionFlagsBits, ChannelType, TextChannel, cha
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { ICommand } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "slowmode",
|
||||
@@ -54,11 +55,11 @@ export = {
|
||||
icon_url: interaction.user.avatarURL() || undefined
|
||||
},
|
||||
title: "Slowmode Update",
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
**Channel:** ${channelMention(channel.id)}
|
||||
**Slowmode:** ${seconds} seconds
|
||||
**Mod:** ${userMention(interaction.user.id)}
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: interaction.user.avatarURL() || ""
|
||||
|
||||
@@ -3,6 +3,7 @@ import { embedColor, devMessage } from "config/options"
|
||||
import { ICommand } from "interfaces"
|
||||
import ms from "ms"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "timeout",
|
||||
@@ -132,12 +133,12 @@ export = {
|
||||
icon_url: mod.user.avatarURL() || undefined
|
||||
},
|
||||
title: title,
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
**User:** ${userMention(target.id)}
|
||||
${timeouttime === null ? "**Time:** `None`" : "**Time:** `" + prettyTime + "`"}
|
||||
**Reason:** \`${reason}\`
|
||||
**Mod:** ${userMention(mod.id)}
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.user.avatarURL() || ""
|
||||
|
||||
@@ -2,6 +2,7 @@ import { SlashCommandBuilder, PermissionFlagsBits, userMention, User } from "dis
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { ICommand } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "unban",
|
||||
@@ -67,11 +68,11 @@ export = {
|
||||
icon_url: mod.avatarURL() || undefined
|
||||
},
|
||||
title: "Member Unbanned",
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
**User:** ${userMention(user!.id)}
|
||||
**Mod:** ${userMention(mod.id)}
|
||||
**Reason:** ${reason}
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.avatarURL() || ""
|
||||
|
||||
@@ -5,6 +5,7 @@ import { embedColor, hypixelGuildID, devMessage } from "config/options"
|
||||
import roleManage from "utils/functions/rolesmanage"
|
||||
import { ICommand } from "interfaces"
|
||||
import { waitingListRole } from "config/roles"
|
||||
import { removeIndents } from "utils/functions/funcs"
|
||||
|
||||
export = {
|
||||
name: "update",
|
||||
@@ -67,11 +68,11 @@ export = {
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
Updated your roles to \`Default Member\`
|
||||
|
||||
IGN: \`${ign}\`
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!
|
||||
@@ -142,11 +143,11 @@ export = {
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
description: `
|
||||
description: removeIndents(`
|
||||
Updated your roles to \`${replyRank}\`
|
||||
|
||||
IGN: \`${ign}\`
|
||||
`.replace(/\n */g, "\n"),
|
||||
`),
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
export function capitalizeFirstLetter(str: string): string {
|
||||
return str[0].toUpperCase() + str.slice(1).toLowerCase()
|
||||
}
|
||||
|
||||
export function removeIndents(str: string): string {
|
||||
return str.replace(/^ */gm, "")
|
||||
}
|
||||
Reference in New Issue
Block a user