feat: split to tres discord server

This commit is contained in:
TresAbhi committed 2023-05-19 23:36:02 +00:00
1 parent cd48b65ed6
commit 784f983bd2
6 files changed
+19 -14

No files matched your search

+8 -5
View File
@@ -1,9 +1,12 @@
{
"client_id": "1097673957865443370",
"client_id_dev": "1099063696015229078",
"guild_id": "894784231677513819",
"verify_channel": "909968131873726545",
"log_channel": "1101124775100809307",
"verify_role": "909968395154358333",
"peasant_role": "896878529512370228"
"sklld_guild_id": "894784231677513819",
"sklld_verify_channel": "909968131873726545",
"sklld_verify_role": "909968395154358333",
"sklld_peasant_role": "896878529512370228",
"tres_guild_id": "734786591205359697",
"tres_log_channel": "1109262265850544148"
}
+1 -1
View File
@@ -28,7 +28,7 @@ export default {
`**About**\n${
client.user?.username
} automates many mundane tasks and provide statistics in numerous flexible ways.\n\nMade by TresAbhi from the Skilled [SKLLD] clan.\nGitHub: https://github.com/tresabhi/sklld-bot\nDiscord server: https://discord.gg/nDt7AjGJQH\nSkilled server: https://discord.gg/ZPvcEG7DS8\n\n**Commands**\n${(interaction.guildId ===
discord.guild_id
discord.sklld_guild_id
? [...guildCommands, ...publicCommands]
: publicCommands
)
+3 -3
View File
@@ -68,7 +68,7 @@ export default {
try {
await member.setNickname(`${accountInfo[id].nickname}${clanTag}`);
if (interaction.guildId === discord.guild_id) {
if (interaction.guildId === discord.sklld_guild_id) {
if (
!interaction.guild?.members.me?.permissions.has('ManageRoles')
) {
@@ -94,8 +94,8 @@ export default {
return;
}
await member.roles.remove(discord.verify_role);
await member.roles.add(discord.peasant_role);
await member.roles.remove(discord.sklld_verify_role);
await member.roles.add(discord.sklld_peasant_role);
}
await interaction.editReply({
+2 -2
View File
@@ -12,8 +12,8 @@ export function handleError(error: Error, client: Client, command: string) {
(
client.guilds.cache
.get(discord.guild_id)
?.channels.cache.get(discord.log_channel) as TextChannel
.get(discord.tres_guild_id)
?.channels.cache.get(discord.tres_log_channel) as TextChannel
).send({
embeds: [
new EmbedBuilder()
+4 -2
View File
@@ -3,9 +3,11 @@ import discord from '../../discord.json' assert { type: 'json' };
import { SKILLED_COLOR } from '../constants/colors.js';
export default async function (member: GuildMember) {
if (member.guild.id === discord.guild_id) {
if (member.guild.id === discord.sklld_guild_id) {
await (
member.guild.channels.cache.get(discord.verify_channel) as TextChannel
member.guild.channels.cache.get(
discord.sklld_verify_channel,
) as TextChannel
).send({
content: member.toString(),
embeds: [
+1 -1
View File
@@ -59,7 +59,7 @@ try {
console.log(`Refreshing ${guildCommands.length} guild command(s).`);
const guildData = (await rest.put(
Routes.applicationGuildCommands(getClientId(), discord.guild_id),
Routes.applicationGuildCommands(getClientId(), discord.sklld_guild_id),
{ body: guildCommands },
)) as RESTPostAPIChatInputApplicationCommandsJSONBody[];
console.log(`Successfully refreshed ${guildData.length} guild command(s).`);