A Karuta discord grabbing bot
Install node-14
Install tesseract ocr
sudo apt install tesseract-ocr
install image magick
sudo apt install imagemagick
install packages
npm install
Open config.js
{
accessToken: string # Your discord accessToken
allNameInSeries?: Array<string> # A list of series where ALL names matches, skip seriesList && namesList
seriesList?: Array<string> # The list of whished series
namesList?: Array<string> # The list of whished names
channels: Array<{
name?: string # discord channel name, optional
guildId: string # discord Server/Guild id, can be found in typing request
channelId: string # discord channel id, can be found in typing request
grabType: 'interaction'|'reaction' # Use 'reaction' if grab work with emojie, 'interaction' if grab work with buttons
}> # List of scanned channels
}
Get your accessToken in a "typing" request
1 - Via a web browser go to https://discord.com/channels/648031568756998155/648033099317248001 (Karuta official server)
2 - Open channel "karuta-main-1"
3 - Inspect page (Ctrl + Shift + i)
4 - Open "Network" panel
5 - Type a message
7 - Typing request will appear, click on it to see details
8 - In "Network" -> "Typing" -> "Headers" -> "Request Headers" find the "Authorization" header
9 - Copy the value, this is your accessToken, do not share it !
Get guildId and channelId in the channel url
https://discord.com/channels/:guild_id/:channel_id
docker build -t karuta .
docker run karuta
./run.sh