Skip to content

pfgithub/interpunctbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inter·punct bot

running

requires: node >=16.9

corepack enable
git clone https://github.com/pfgithub/interpunctbot
cd interpunctbot
yarn install

building docs

yarn docs

view the docs by setting up a webserver in /docs. for example

yarn global add serve
serve docs

running the bot

go to https://discordapp.com/developers/applications/me and create a new application. in the sidebar go to bot and select to create a bot user.

go to the oauth tab and under scopes check bot. then under bot permissions, select any you want. back in the scopes section, copy the url and visit it to invite the bot to a server.

go to the bot tab and get the token (click to reveal token or press the copy button).

the above thing but in image form

create config/config.json and fill it with

{ "token": "your bot token goes here" }

copy config/knexfile.example.json to config/knexfile.json. you probably don't need to make any changes.

there are other configuration options available which you can see in config/config.example.json

now, set up the database with

yarn knex migrate:latest

start the build watcher with

yarn build-watch

then start the bot with

node built

and restart that to restart the bot

using the ip!restart command

to use the restart command, you have to first add yourself as an owner

in config/config.json, add , "owners": ["your discord id"]

second, you need to run the bot to automatically restart

bash: while node built; do [ ]; done

fish: while node built; end

windows: use git bash or wsl instead

autoreloading docs

run the build watcher

yarn build-watch

and this onchange script

onchange -k built/\*\*/\*.js -- fish -c "node built --gen-docs && serve docs -p 3001"

will restart the docs server every time a file is saved and the code rebuilds

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •