feat: first commit ig

This commit is contained in:
2022-12-31 21:15:46 +01:00
parent 74f1c9aba1
commit 4e949bee90
7 changed files with 1289 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
node_modules/
.env

15
Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
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

5
README.md Normal file
View File

@@ -0,0 +1,5 @@
# Discord Plays Pokémon
Yeah, sooo this just connects a discord bot to a Docker Webtop.
This doesn't use sern Hander, but it should be. Be sure to check them out at [sern-handler/handler on gh](https://github.com/sern-handler/handler)

19
index.js Normal file
View File

@@ -0,0 +1,19 @@
const robot = require('robotjs')
const execa = require('execa')
require('dotenv').config()
const { Client } = require('discord.js')
const colorette = require('colorette')
const client = new Client({
intents: [
'Guilds',
'GuildMembers',
'GuildMessages',
]
})
client.on('ready', () => {
console.log(colorette.bgGreen('Logged onto Discord!'))
execa('echo "Hello World!"')
})

20
package.json Normal file
View File

@@ -0,0 +1,20 @@
{
"name": "discord-plays-pokemon",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"colorette": "^2.0.19",
"discord.js": "^14.7.1",
"dotenv": "^16.0.3",
"execa": "^6.1.0",
"node-media-server": "^2.4.9",
"robotjs": "^0.6.0"
}
}

18
rtmp.js Normal file
View File

@@ -0,0 +1,18 @@
const NodeMediaServer = require('node-media-server');
const config = {
rtmp: {
port: 1935,
chunk_size: 60000,
gop_cache: true,
ping: 30,
ping_timeout: 60
},
http: {
port: 8000,
allow_origin: '*'
}
};
var nms = new NodeMediaServer(config)
nms.run();

1210
yarn.lock Normal file

File diff suppressed because it is too large Load Diff