https://github.com/mobergmann/pingme
A discord bot. Subscribe to a channel and get pinged (DM) whenever there is a new message posted on the channel. Good for thread like channels.
https://github.com/mobergmann/pingme
discord discord-bot dpp xmake
Last synced: over 1 year ago
JSON representation
A discord bot. Subscribe to a channel and get pinged (DM) whenever there is a new message posted on the channel. Good for thread like channels.
- Host: GitHub
- URL: https://github.com/mobergmann/pingme
- Owner: mobergmann
- License: mit
- Archived: true
- Created: 2023-07-01T13:42:27.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-08T19:08:12.000Z (almost 3 years ago)
- Last Synced: 2024-10-24T13:59:01.338Z (over 1 year ago)
- Topics: discord, discord-bot, dpp, xmake
- Language: C++
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pingme
This bot is indented to be used as a newsletter for certain channels.
You can subscribe to channels and when a new message is sent to the channel you will be notified with a DM from the bot.
For that, you have to enable private DMs from strainers.
# Usage
- `/subscribe [channel]` Subscribes you to a newsletter of a channel and notifies you when a new message appears in a given channel with a DM
- `/unsubscribe [channel]` Unsubscribes you from a newsletter for a given channel
- `/list` Lists all your subscribed newsletters
## Setup
For the bot to function you have to enable DMs from strangers, as the bot will try to send you the newsletter per DM.
To do that you have to open the _server privacy settings_ and then turn on _Direct Messages_.
You can also enable _Allow direct messages from server members_ in the _account settings_.
But this is **not encouraged**, as this would allow anyone on every server to DM you.
If you don't want others to send you messages you could also add the bot to a "private" server, where only you and the bot are located.
Then you can enable _Direct Messages_ in the _server privacy settings_ for that server.
# Hosting
## Compiling
### Dependencies
- xmake
### Compilation
To compile the project make sure you have xmake installed.
Then clone the repository, `cd` into the repository, and execute `xmake build`.
Make sure you have a token for your bot.
Add the Token as the environment variable `BOT_TOKEN`.
## Podman/Docker
You can compile and install the bot in a container.
The image automatically pulls all needed dependencies and compiles the project for you in the container, no need to install dependencies and compiling.
It is as simple as cloning the repository, building the image and then running the image.
### Using Podman:
```
git clone https://github.com/mobergmann/pingme.git
podman build -t pingme_b .
podman run -e BOT_TOKEN="" -d --name pingme pingme_b
```
### Using Docker:
```
git clone https://github.com/mobergmann/pingme.git
docker build -t pingme_b .
docker run -e BOT_TOKEN="" -d --name pingme pingme_b
```
You need to have the new docker build tool `docker-buildx` installed.
---
Make sure to replace `` with your bot token.