mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-19 08:41:39 +01:00
add basic README.md, very minor changes
This commit is contained in:
18
README.md
Normal file
18
README.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# OpenMandooBot
|
||||||
|
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
VARIABLE|DEFAULT|FUNCTION
|
||||||
|
-|-|-
|
||||||
|
`BOT_NAME`|None|Set the name of the bot user for Authentification
|
||||||
|
`CHANNEL`|None| Set the name of the twitch channel to join
|
||||||
|
`CLIENT_ID`|None|Set the CLIENT_ID to authenticate the bot (ignored after setup)
|
||||||
|
`CLIENT_SECRET`|None|Set the CLIENT_SECRET to authenticate the bot (ignored after setup)
|
||||||
|
`REDIRECT_URI`|`https://qweri0p.github.io/url-params/`|The REDIRECT_URI set in the twitch dev console (optional after setup)
|
||||||
|
`OAUTH_CODE`|None|Authorization code for OAuth (ignored after setup)
|
||||||
|
`DIFFERENT_BROADCASTER`|`false`|Set this to true when `BOT_NAME` and `CHANNEL` are different.
|
||||||
|
`BROADCASER_OAUTH_CODE`|None|OAuth authorization code for the broadcaster (ignored if `DIFFERENT_BROADCASTER` is false) (optional after setup)
|
||||||
|
`PBURL`|`http://pocketbase:8090`|Where the pocketbase database is found
|
||||||
|
`EMAIL`|`test@example.com`|Pocketbase Admin UI email used for login (ignored after setup)
|
||||||
|
`PASSWORD`|`1234567890`|Pocketbase Admin UI password used for login (ignored after setup)
|
||||||
@@ -13,7 +13,6 @@ const bot = new Bot({
|
|||||||
})
|
})
|
||||||
|
|
||||||
bot.onConnect(async () => {
|
bot.onConnect(async () => {
|
||||||
// await authProvider.refreshAccessTokenForUser(238377856)
|
|
||||||
const name = await api.users.getUserByName(process.env.BOT_NAME!)
|
const name = await api.users.getUserByName(process.env.BOT_NAME!)
|
||||||
await authProvider.refreshAccessTokenForUser(name?.id!)
|
await authProvider.refreshAccessTokenForUser(name?.id!)
|
||||||
if (broadcasterAuthProvider) {
|
if (broadcasterAuthProvider) {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
import PocketBase from 'pocketbase'
|
import PocketBase from 'pocketbase'
|
||||||
const pb = new PocketBase('http://pocketbase:8090')
|
const PBURL = process.env.PBURL ?? 'http://pocketbase:8090'
|
||||||
export default pb
|
const pb = new PocketBase(PBURL)
|
||||||
|
export default pb
|
||||||
|
|||||||
Reference in New Issue
Block a user