potomark-bot-rb/README.md

32 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2023-07-24 15:28:31 +00:00
# potomark is a simple bookmarking and pinning discord bot.
2023-07-24 15:19:30 +00:00
there's no configuration besides a `.env` file with two keys:
- the bot's token `DISCORD_TOKEN`,
- channel id for a sentence game `SENTENCE_CHANNEL`. if you don't want to enable the sentence game, set the key to `-1`.
2022-09-18 00:01:06 +00:00
## why?
because we needed a tiny, self hostable bot to remember things of importance for our equally tiny discord server.
## what it do?
2023-07-24 15:28:31 +00:00
- DMs a user a link to any message they react with 🔖 to (tip: you can change the `BOOKMARK_EMOJI` constant in `bot.rb` to any built-in emoji). this also sends part of the message for quick access,
- lets users pin messages to the channel by reacting with 📌 on that message (change `PIN_EMOJI` to change the emoji). if there are no more of that emoji reactions on the message, it gets unpinned.
- lets users make sentences one word (or more) at a time in `SENTENCE_CHANNEL`. to finish a sentence, send either of these as a message: `?`, `!`, `.`, `...`, `?!`
2022-09-18 00:01:06 +00:00
## how?
requires [ruby](https://www.ruby-lang.org/) >= 3.0 and [bundler](https://bundler.io) >= 2.3.19. the only two dependencies are `dotenv` and `discordrb`, as specified in the `Gemfile`.
2023-07-24 15:19:30 +00:00
quick setup:
2022-09-18 00:01:06 +00:00
```bash
2023-07-24 15:19:30 +00:00
$ git clone https://git.poto.cafe/yagich/potomark-bot-rb.git && cd potomark-bot-rb
2022-09-18 00:01:06 +00:00
$ echo 'DISCORD_TOKEN=YOUR.DISCORD.TOKEN.HERE' > .env
2023-07-24 15:19:30 +00:00
$ echo 'SENTENCE_CHANNEL=SENTENCE_GAME_CHANNEL_ID' >> .env
2022-09-18 00:01:06 +00:00
$ bundle install
$ ruby bot.rb
```
## license?
the full license text is as follows:
```
you may not use this code for any purpose.
```