0.4.0.b3 remove initConfig
This commit is contained in:
parent
9919e74836
commit
ff6e132ab4
5 changed files with 8 additions and 19 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "sknsybot",
|
"name": "sknsybot",
|
||||||
"version": "0.4.0.b2",
|
"version": "0.4.0.b3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "sknsybot",
|
"name": "sknsybot",
|
||||||
"version": "0.4.0.b2",
|
"version": "0.4.0.b3",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^5.4.1",
|
"chalk": "^5.4.1",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sknsybot",
|
"name": "sknsybot",
|
||||||
"version": "0.4.0.b2",
|
"version": "0.4.0.b3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "",
|
"description": "",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
import { configDotenv } from 'dotenv';
|
|
||||||
import process from 'node:process';
|
|
||||||
|
|
||||||
export default function init (){
|
|
||||||
configDotenv();
|
|
||||||
|
|
||||||
if (!process.env.DATABASE_URL) {
|
|
||||||
throw new Error('DATABASE_URL not set. Cowardly refusing to start up');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
import { configDotenv } from "dotenv";
|
import { configDotenv } from "dotenv";
|
||||||
|
|
||||||
configDotenv(); // apparently init does not get executed
|
configDotenv();
|
||||||
|
|
||||||
const client = (await import("./bot")).default;
|
const client = (await import("./bot")).default;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,14 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import init from "./initConfig";
|
|
||||||
|
import { configDotenv } from "dotenv";
|
||||||
|
|
||||||
|
configDotenv();
|
||||||
|
|
||||||
import commandList from "./commandList";
|
import commandList from "./commandList";
|
||||||
import { REST, Routes } from 'discord.js';
|
import { REST, Routes } from 'discord.js';
|
||||||
|
|
||||||
init();
|
|
||||||
|
|
||||||
function registerGlobal(rest: REST, clientId: string, commands: any){
|
function registerGlobal(rest: REST, clientId: string, commands: any){
|
||||||
rest.put(Routes.applicationCommands(clientId), { body: commands })
|
rest.put(Routes.applicationCommands(clientId), { body: commands })
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue