SpaghettiBorgar / Einkaufsliste

A simple shopping list bot for discord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Einkaufsliste

A simple shopping list bot for discord written in go

Screenshot

Usage

Setup

In a dedicated channel, run !trackchannel or !addchannel (assuming default prefix !) to start tracking items in this channel. Use !untrackchannel or !removechannel to undo this again.

Behaviour

The Bot will take every message you type in tracked channels, repeat them line by line, and add reaction buttons for striking, deleting, and editing the items. Messages starting with # will be ignored. In messages with multiple items, lines starting with # will not be treated as items but repeated bold and underlined to act as a separator or note. To edit items, react with the pencil icon, and send a message with the text to replace the item. Remove the reaction again to cancel.

Running

This bot is made with go, so you need to install the go toolchain to compile it. You need version 1.19.

Run go mod tidy once.

Create an application and bot account in the discord developer portal. You need the "message content intent" so enable that. Make sure your bot has the permissions to send messages, read message history, delete messages, and add reactions

Put the bot account token in a file called token.secret (Without the Bot prefix).

Then simply execute run.sh to run the bot and append output to a log file.

About

A simple shopping list bot for discord


Languages

Language:Go 99.3%Language:Shell 0.7%