diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 91319ab..0000000 --- a/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM node:latest - -WORKDIR /app - -RUN apk add --no-cache --virtual .build-deps make gcc g++ python - -COPY package.json ./ - -RUN npm install - -COPY . . - -RUN tsc --build - -CMD node dist/index.js \ No newline at end of file diff --git a/index.js b/index.js index 1d0c030..a6dc302 100644 --- a/index.js +++ b/index.js @@ -1,19 +1,20 @@ -const robot = require('robotjs') -const execa = require('execa') -require('dotenv').config() -const { Client } = require('discord.js') -const colorette = require('colorette') +import robot from 'robotjs' +import {execa} from 'execa' +import 'dotenv/config' +import { Client } from 'discord.js' +import * as colorette from 'colorette' const client = new Client({ - intents: [ - 'Guilds', - 'GuildMembers', - 'GuildMessages', - ] + intents: [ + 'Guilds', + 'GuildMessages', + ] }) client.on('ready', () => { - console.log(colorette.bgGreen('Logged onto Discord!')) + console.log(colorette.bgGreen('Logged onto Discord!')) - execa('echo "Hello World!"') -}) \ No newline at end of file + execa('echo Hey!').then(process => console.log(process.stdout)) +}) + +client.login(process.env.TOKEN) \ No newline at end of file diff --git a/package.json b/package.json index 1cca935..248e8fc 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, + "type": "module", "keywords": [], "author": "", "license": "ISC",