mirror of
https://github.com/SrIzan10/discord-plays-pokemon.git
synced 2026-06-06 00:56:49 +00:00
feat: first commit ig
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
node_modules/
|
||||
.env
|
||||
15
Dockerfile
Normal file
15
Dockerfile
Normal 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
5
README.md
Normal 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
19
index.js
Normal 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
20
package.json
Normal 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
18
rtmp.js
Normal 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();
|
||||
Reference in New Issue
Block a user