mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: split to tres discord server
This commit is contained in:
1 parent
cd48b65ed6
commit
784f983bd2
6 files changed
+19
-14
No files matched your search
+8
-5
@@ -1,9 +1,12 @@
|
|||||||
{
|
{
|
||||||
"client_id": "1097673957865443370",
|
"client_id": "1097673957865443370",
|
||||||
"client_id_dev": "1099063696015229078",
|
"client_id_dev": "1099063696015229078",
|
||||||
"guild_id": "894784231677513819",
|
|
||||||
"verify_channel": "909968131873726545",
|
"sklld_guild_id": "894784231677513819",
|
||||||
"log_channel": "1101124775100809307",
|
"sklld_verify_channel": "909968131873726545",
|
||||||
"verify_role": "909968395154358333",
|
"sklld_verify_role": "909968395154358333",
|
||||||
"peasant_role": "896878529512370228"
|
"sklld_peasant_role": "896878529512370228",
|
||||||
|
|
||||||
|
"tres_guild_id": "734786591205359697",
|
||||||
|
"tres_log_channel": "1109262265850544148"
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,7 @@ export default {
|
|||||||
`**About**\n${
|
`**About**\n${
|
||||||
client.user?.username
|
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 ===
|
} 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]
|
? [...guildCommands, ...publicCommands]
|
||||||
: publicCommands
|
: publicCommands
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
await member.setNickname(`${accountInfo[id].nickname}${clanTag}`);
|
await member.setNickname(`${accountInfo[id].nickname}${clanTag}`);
|
||||||
|
|
||||||
if (interaction.guildId === discord.guild_id) {
|
if (interaction.guildId === discord.sklld_guild_id) {
|
||||||
if (
|
if (
|
||||||
!interaction.guild?.members.me?.permissions.has('ManageRoles')
|
!interaction.guild?.members.me?.permissions.has('ManageRoles')
|
||||||
) {
|
) {
|
||||||
@@ -94,8 +94,8 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await member.roles.remove(discord.verify_role);
|
await member.roles.remove(discord.sklld_verify_role);
|
||||||
await member.roles.add(discord.peasant_role);
|
await member.roles.add(discord.sklld_peasant_role);
|
||||||
}
|
}
|
||||||
|
|
||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
|
|||||||
+2
-2
@@ -12,8 +12,8 @@ export function handleError(error: Error, client: Client, command: string) {
|
|||||||
|
|
||||||
(
|
(
|
||||||
client.guilds.cache
|
client.guilds.cache
|
||||||
.get(discord.guild_id)
|
.get(discord.tres_guild_id)
|
||||||
?.channels.cache.get(discord.log_channel) as TextChannel
|
?.channels.cache.get(discord.tres_log_channel) as TextChannel
|
||||||
).send({
|
).send({
|
||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
|
|||||||
@@ -3,9 +3,11 @@ import discord from '../../discord.json' assert { type: 'json' };
|
|||||||
import { SKILLED_COLOR } from '../constants/colors.js';
|
import { SKILLED_COLOR } from '../constants/colors.js';
|
||||||
|
|
||||||
export default async function (member: GuildMember) {
|
export default async function (member: GuildMember) {
|
||||||
if (member.guild.id === discord.guild_id) {
|
if (member.guild.id === discord.sklld_guild_id) {
|
||||||
await (
|
await (
|
||||||
member.guild.channels.cache.get(discord.verify_channel) as TextChannel
|
member.guild.channels.cache.get(
|
||||||
|
discord.sklld_verify_channel,
|
||||||
|
) as TextChannel
|
||||||
).send({
|
).send({
|
||||||
content: member.toString(),
|
content: member.toString(),
|
||||||
embeds: [
|
embeds: [
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ try {
|
|||||||
|
|
||||||
console.log(`Refreshing ${guildCommands.length} guild command(s).`);
|
console.log(`Refreshing ${guildCommands.length} guild command(s).`);
|
||||||
const guildData = (await rest.put(
|
const guildData = (await rest.put(
|
||||||
Routes.applicationGuildCommands(getClientId(), discord.guild_id),
|
Routes.applicationGuildCommands(getClientId(), discord.sklld_guild_id),
|
||||||
{ body: guildCommands },
|
{ body: guildCommands },
|
||||||
)) as RESTPostAPIChatInputApplicationCommandsJSONBody[];
|
)) as RESTPostAPIChatInputApplicationCommandsJSONBody[];
|
||||||
console.log(`Successfully refreshed ${guildData.length} guild command(s).`);
|
console.log(`Successfully refreshed ${guildData.length} guild command(s).`);
|
||||||
|
|||||||
Reference in new issue
Block a user