mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: code split bot
This commit is contained in:
1 parent
6ec3835896
commit
1257aa76d7
6 files changed
+19
-17
No files matched your search
+1
-14
@@ -1,19 +1,6 @@
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import { Client, GatewayIntentBits } from 'discord.js';
|
||||
import { client } from './core/discord/client';
|
||||
import { secrets } from './core/node/secrets';
|
||||
import { registerErrorHandlers } from './events/error';
|
||||
import guildMemberAdd from './events/guildMemberAdd';
|
||||
import interactionCreate from './events/interactionCreate';
|
||||
import ready from './events/ready';
|
||||
|
||||
export const client = new Client({
|
||||
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers],
|
||||
})
|
||||
.on('ready', ready)
|
||||
.on('guildMemberAdd', guildMemberAdd)
|
||||
.on('interactionCreate', interactionCreate);
|
||||
|
||||
export const octokit = new Octokit({ auth: secrets.GH_TOKEN });
|
||||
|
||||
registerErrorHandlers();
|
||||
client.login(secrets.DISCORD_TOKEN);
|
||||
@@ -1,8 +1,8 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import packageJSON from '../../package.json' assert { type: 'json' };
|
||||
import { client } from '../bot';
|
||||
import { tankopedia } from '../core/blitz/tankopedia';
|
||||
import { tankAverages } from '../core/blitzstars/tankAverages';
|
||||
import { client } from '../core/discord/client';
|
||||
import embedInfo from '../core/discord/embedInfo';
|
||||
import markdownTable from '../core/discord/markdownTable';
|
||||
import getClientId from '../core/node/getClientId';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BlitzkriegRatingsLeaderboard } from '../../../scripts/buildRatingsLeaderboard';
|
||||
import { octokit } from '../../bot';
|
||||
import { Region } from '../../constants/regions';
|
||||
import { octokit } from '../express/octokit';
|
||||
|
||||
export const DATABASE_REPO = { owner: 'tresabhi', repo: 'blitzkrieg-db' };
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Client, GatewayIntentBits } from 'discord.js';
|
||||
import guildMemberAdd from '../../events/guildMemberAdd';
|
||||
import interactionCreate from '../../events/interactionCreate';
|
||||
import ready from '../../events/ready';
|
||||
|
||||
export const client = new Client({
|
||||
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers],
|
||||
})
|
||||
.on('ready', ready)
|
||||
.on('guildMemberAdd', guildMemberAdd)
|
||||
.on('interactionCreate', interactionCreate);
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import { secrets } from '../node/secrets';
|
||||
|
||||
export const octokit = new Octokit({ auth: secrets.GH_TOKEN });
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { EmbedBuilder, TextChannel } from 'discord.js';
|
||||
import discord from '../../discord.json' assert { type: 'json' };
|
||||
import { client } from '../bot';
|
||||
import { NEGATIVE_COLOR } from '../constants/colors';
|
||||
import { client } from '../core/discord/client';
|
||||
import isDev from '../core/node/isDev';
|
||||
|
||||
const PROCESS_ERROR_EVENTS = ['uncaughtException'];
|
||||
|
||||
Reference in new issue
Block a user