mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: split config.json into public and private
This commit is contained in:
1 parent
c3399b54c5
commit
a5ebcd92a7
5 files changed
+16
-14
No files matched your search
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"discord_token": "",
|
"discord_token": "",
|
||||||
"discord_client_id": "",
|
|
||||||
"discord_guild_id": "",
|
|
||||||
"discord_verify_channel": "",
|
|
||||||
"wargaming_application_id": ""
|
"wargaming_application_id": ""
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"client_id": "1097673957865443370",
|
||||||
|
"guild_id": "894784231677513819",
|
||||||
|
"verify_channel": "1097677884266643527",
|
||||||
|
"verify_role": "909968395154358333",
|
||||||
|
"peasant_role": "896878529512370228"
|
||||||
|
}
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
import { faker } from '@faker-js/faker';
|
import { faker } from '@faker-js/faker';
|
||||||
import { EmbedBuilder, GuildMember, TextChannel } from 'discord.js';
|
import { EmbedBuilder, GuildMember, TextChannel } from 'discord.js';
|
||||||
import config from '../../config.json' assert { type: 'json' };
|
import discord from '../../discord.json' assert { type: 'json' };
|
||||||
|
|
||||||
export default async function (member: GuildMember) {
|
export default async function (member: GuildMember) {
|
||||||
console.log(`${member.user.tag} joined`);
|
console.log(`${member.user.tag} joined`);
|
||||||
|
|
||||||
await (
|
await (
|
||||||
member.guild.channels.cache.get(
|
member.guild.channels.cache.get(discord.verify_channel) as TextChannel
|
||||||
config.discord_verify_channel,
|
|
||||||
) as TextChannel
|
|
||||||
).send({
|
).send({
|
||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
@@ -24,8 +22,6 @@ export default async function (member: GuildMember) {
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
await (
|
await (
|
||||||
member.guild.channels.cache.get(
|
member.guild.channels.cache.get(discord.verify_channel) as TextChannel
|
||||||
config.discord_verify_channel,
|
|
||||||
) as TextChannel
|
|
||||||
).send(member.toString());
|
).send(member.toString());
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import discord from '../../discord.json' assert { type: 'json' };
|
||||||
import {
|
import {
|
||||||
CacheType,
|
CacheType,
|
||||||
Collection,
|
Collection,
|
||||||
@@ -31,8 +32,8 @@ try {
|
|||||||
|
|
||||||
const data = (await rest.put(
|
const data = (await rest.put(
|
||||||
Routes.applicationGuildCommands(
|
Routes.applicationGuildCommands(
|
||||||
config.discord_client_id,
|
discord.client_id,
|
||||||
config.discord_guild_id,
|
discord.guild_id,
|
||||||
),
|
),
|
||||||
{ body: commands },
|
{ body: commands },
|
||||||
)) as { length: number };
|
)) as { length: number };
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
SlashCommandBuilder,
|
SlashCommandBuilder,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import config from '../../config.json' assert { type: 'json' };
|
import config from '../../config.json' assert { type: 'json' };
|
||||||
|
import discord from '../../discord.json' assert { type: 'json' };
|
||||||
import AccountList from '../types/accountList.js';
|
import AccountList from '../types/accountList.js';
|
||||||
|
|
||||||
const SERVER_NAMES = { com: 'North America', eu: 'Europe', asia: 'Asia' };
|
const SERVER_NAMES = { com: 'North America', eu: 'Europe', asia: 'Asia' };
|
||||||
@@ -37,8 +38,8 @@ export async function execute(
|
|||||||
member
|
member
|
||||||
?.setNickname(`${ign}${clanTag}`)
|
?.setNickname(`${ign}${clanTag}`)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await member.roles.remove(config.discord_verify_role);
|
await member.roles.remove(discord.verify_role);
|
||||||
await member.roles.add(config.discord_peasant_role);
|
await member.roles.add(discord.peasant_role);
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
|
|||||||
Reference in new issue
Block a user