Socket
Socket
Sign inDemoInstall

@conflict/beta

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@conflict/beta - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

babel.config.js

14

bot.js

@@ -57,2 +57,11 @@ import Discord, {

let { token, intents, errorHandler, plugins } = config.default;
if (!token) token = process.env.TOKEN ?? process.env.token;
if (!token) {
try {
token = fs.readFileSync(process.cwd() + '/token', 'utf8');
} catch (err) {
stump.error(new Error('Missing token. No token found in config file, token file, or env variable.'));
process.exit(1);
}
}
if (!plugins) plugins = [];

@@ -329,3 +338,6 @@

await initEvents();
for (const plugin of plugins) {
for (let plugin of plugins) {
if (typeof plugin === "string") plugin = (await plugin()).default;
if (plugin instanceof Promise) plugin = await plugin;
if (plugin && plugin.default && plugin.default instanceof Function) plugin = plugin.default;
plugin({

@@ -332,0 +344,0 @@ stump,

@@ -5,2 +5,3 @@ import { ShardingManager } from 'discord.js';

import path from 'path';
import fs from 'fs';
import chokidar from 'chokidar';

@@ -12,3 +13,3 @@ import { dirname } from "esm-dirname";

return new Promise((resolve, reject) => {
exec('npx babel bot --out-dir .conflict/build', { cwd: process.cwd() }, (error, stdout, stderr) => {
exec('npx babel bot --out-dir .conflict/build --config-file ' + path.join(__dirname, '..', 'babel.config.js'), { cwd: process.cwd() }, (error, stdout, stderr) => {
if (error) return reject(error);

@@ -38,3 +39,12 @@ resolve({ stdout, stderr });

const { token } = config.default;
let { token } = config.default;
if (!token) token = process.env.TOKEN ?? process.env.token;
if (!token) {
try {
token = fs.readFileSync(process.cwd() + '/token', 'utf8');
} catch (err) {
stump.error(new Error('Missing token. No token found in config file, token file, or env variable.'));
process.exit(1);
}
}

@@ -41,0 +51,0 @@ const manager = new ShardingManager(path.join(__dirname, '..', 'bot.js'), { token: token });

@@ -6,2 +6,3 @@ #!/usr/bin/env node

import path from 'path'
import fs from 'fs'
import { exec } from 'child_process'

@@ -22,3 +23,3 @@ const __dirname = dirname(import.meta);

stump.info('Starting build...');
exec('npx babel bot --out-dir .conflict/build', { cwd: process.cwd() }, (error, stdout, stderr) => {
exec('npx babel bot --out-dir .conflict/build --config-file ' + path.join(__dirname, 'babel.config.js'), { cwd: process.cwd() }, (error, stdout, stderr) => {
if (error) return stump.error(error);

@@ -41,3 +42,12 @@ stdout.trim().split('\n').filter(line => line).forEach(line => stump.info(line));

}
const { token } = config.default;
let { token } = config.default;
if (!token) token = process.env.TOKEN ?? process.env.token;
if (!token) {
try {
token = fs.readFileSync(process.cwd() + '/token', 'utf8');
} catch (err) {
stump.error(new Error('Missing token. No token found in config file, token file, or env variable.'));
process.exit(1);
}
}

@@ -44,0 +54,0 @@ const manager = new ShardingManager(path.join(__dirname, 'bot.js'), { token: token });

6

package.json
{
"name": "@conflict/beta",
"version": "0.6.0",
"version": "0.7.0",
"description": "The first and only UI framework for Discord bots",

@@ -48,3 +48,5 @@ "main": "exports.js",

"./Components": "./components.js",
"./babel-plugin": "./babel.js"
"./babel-plugin": "./babel.js",
"./global-ratelimit-plugin": "./plugins/global-ratelimit.js",
"./plugins": "./plugins"
},

@@ -51,0 +53,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc