Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lfwells/discord-lecture-reader
https://github.com/lfwells/discord-lecture-reader
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/lfwells/discord-lecture-reader
- Owner: lfwells
- Created: 2021-02-19T06:51:58.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-23T12:58:35.000Z (6 months ago)
- Last Synced: 2024-07-23T15:08:42.462Z (6 months ago)
- Language: JavaScript
- Size: 22.4 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Audit: audit/events.js
Awesome Lists containing this project
README
# A slightly-less basic teaching tool for Discord
This node.js app can:
- Read a lecture chat for polls and display in HTML for OBS
- Post saved polls
- Track attendance
- Respond snarkily to those who @ it (later will see if people are @ing ian or lindsay when they are away)It will hopefullys be so much more ;)
## Installation
Requires node.jsDependencies
`npm install`
`sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080`
Add bot to your server with invite link
[https://discord.com/api/oauth2/authorize?client_id=811958340967071745&permissions=8&redirect_uri=https%3A%2F%2Fplayur.io&scope=bot]In the root directory, you will need a token.txt file containing your discord token.
In the root directory, you will need a `users.js` file with the users and passwords. It should look like:
`module.exports = {
users: { 'username': 'password' },
challenge: true
}`## Usage
`sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080`
```
npm install pm2 -g
pm2 start ecosystem.config.cjs
pm2 monit
```
https://pm2.keymetrics.io/docs/usage/quick-start/#:~:text=Restart%20application%20on%20changes&text=This%20will%20watch%20%26%20restart%20the,check%20for%20restarted%20app%20logs.See the built-in user guid for more info on how to use the actual bot.
## Renew SSL
- Set `server.js` to `app.use('/', express.static(path.join(__dirname, 'www')))`
- `pm2 restart all`
- `sudo certbot certonly --force-renew -d utasbot.dev --http-01-port=8080`
- Choose 2 webroot
- Enter webroot `discord/www`
- Change the `server.js` back to `app.use('/static', express.static(path.join(__dirname, 'www')))`
- `pm2 restart all`