mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: temp host compat
This commit is contained in:
1 parent
4db068e8ab
commit
e35453f3e4
5 files changed
-55
No files matched your search
@@ -1,43 +0,0 @@
|
|||||||
name: Temporary Host
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '*/50 */5 * * *'
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Host
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [16.x]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Get code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Use node
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install Yarn
|
|
||||||
run: npm install --location=global yarn
|
|
||||||
|
|
||||||
- name: Use node_modules cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: '**/node_modules'
|
|
||||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: yarn
|
|
||||||
|
|
||||||
- name: Host
|
|
||||||
run: DISCORD_TOKEN=${{ secrets.DISCORD_TOKEN }} WARGAMING_APPLICATION_ID=${{ secrets.WARGAMING_APPLICATION_ID }} yarn run start
|
|
||||||
@@ -7,12 +7,9 @@ import {
|
|||||||
Routes,
|
Routes,
|
||||||
SlashCommandBuilder,
|
SlashCommandBuilder,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import { config } from 'dotenv';
|
|
||||||
import { readdirSync } from 'fs';
|
import { readdirSync } from 'fs';
|
||||||
import discord from '../../discord.json' assert { type: 'json' };
|
import discord from '../../discord.json' assert { type: 'json' };
|
||||||
|
|
||||||
config();
|
|
||||||
|
|
||||||
export interface CommandRegistry {
|
export interface CommandRegistry {
|
||||||
data: SlashCommandBuilder;
|
data: SlashCommandBuilder;
|
||||||
execute: (interaction: Interaction) => void;
|
execute: (interaction: Interaction) => void;
|
||||||
|
|||||||
@@ -4,12 +4,9 @@ import {
|
|||||||
EmbedBuilder,
|
EmbedBuilder,
|
||||||
SlashCommandBuilder,
|
SlashCommandBuilder,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import { config } from 'dotenv';
|
|
||||||
import discord from '../../discord.json' assert { type: 'json' };
|
import discord from '../../discord.json' assert { type: 'json' };
|
||||||
import AccountList from '../types/accountList.js';
|
import AccountList from '../types/accountList.js';
|
||||||
|
|
||||||
config();
|
|
||||||
|
|
||||||
const SERVER_NAMES = { com: 'North America', eu: 'Europe', asia: 'Asia' };
|
const SERVER_NAMES = { com: 'North America', eu: 'Europe', asia: 'Asia' };
|
||||||
|
|
||||||
export async function execute(
|
export async function execute(
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import { Client, GatewayIntentBits } from 'discord.js';
|
import { Client, GatewayIntentBits } from 'discord.js';
|
||||||
import { config } from 'dotenv';
|
|
||||||
import guildMemberAdd from './behaviors/guildMemberAdd.js';
|
import guildMemberAdd from './behaviors/guildMemberAdd.js';
|
||||||
import interactionCreate from './behaviors/interactionCreate.js';
|
import interactionCreate from './behaviors/interactionCreate.js';
|
||||||
import ready from './behaviors/ready.js';
|
import ready from './behaviors/ready.js';
|
||||||
import tokenRequirements from './utilities/tokenRequirements.js';
|
import tokenRequirements from './utilities/tokenRequirements.js';
|
||||||
|
|
||||||
config();
|
|
||||||
tokenRequirements();
|
tokenRequirements();
|
||||||
|
|
||||||
const client = new Client({
|
const client = new Client({
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
import { config } from 'dotenv';
|
|
||||||
|
|
||||||
config();
|
|
||||||
|
|
||||||
export default function tokenRequirements() {
|
export default function tokenRequirements() {
|
||||||
if (!process.env.DISCORD_TOKEN) {
|
if (!process.env.DISCORD_TOKEN) {
|
||||||
throw new Error('DISCORD_TOKEN is not defined');
|
throw new Error('DISCORD_TOKEN is not defined');
|
||||||
|
|||||||
Reference in new issue
Block a user