Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lila-kuhlt/cow-guard_bot
A discord bot for getting passwords with https://onetimesecret.com/ if having a certain role
https://github.com/lila-kuhlt/cow-guard_bot
Last synced: 28 days ago
JSON representation
A discord bot for getting passwords with https://onetimesecret.com/ if having a certain role
- Host: GitHub
- URL: https://github.com/lila-kuhlt/cow-guard_bot
- Owner: Lila-Kuhlt
- License: mit
- Created: 2022-03-08T17:26:24.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-16T14:08:44.000Z (over 2 years ago)
- Last Synced: 2024-11-05T16:29:07.837Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 151 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Cow-Guard_bot
A discord bot for getting passwords with https://onetimesecret.com/ if having a certain role## Features
This bot can run the following commands:
* ```help```: Shows all commands or more information about a specific command
* ```pw```: Without args: List of all passwords; With args: Get password when you have a whitelisted discord role!## Preparations
* You need [node.js](https://nodejs.org/en/) (v16.14.0 or higher) installed.
* You need a [Discord API Bot](https://discord.com/developers/applications) with it's token.
* You need a [Discord server](https://support.discord.com/hc/en-us/articles/204849977-How-do-I-create-a-server) on which you can set permissions, so you can invite the bot and give it the following permissions:
* View Channels
* Send Messages
* Send Messages in Threads## Configuration
1. Rename the configuration file *(/config/config-template.json)* from ```config-template.json``` to ```config.json```
2. Open and set the configuration file (now ```config.json```) (see [Config-Table](#Config-Table) below)
3. Run ```npm install```.## Config-File
### Config-Table
| Key | Description | Value-Type | Must be set |
|----------|---------------------------------------------------------------------|-----------------|-------------|
| prefix | The bot's prefix | String | yes |
| token | The bot's token | String | yes |
| api_user | The User-Name (E-Mail) of personal *onetimesecret*-Account | String | yes |
| api_key | The API-Key of personal *onetimesecret*-Account | String | yes |
| pw | The saved passwords. Fill with [Password-Objects](#Password-Object) | Array of Object | yes |### Password-Object
```json
"": { // the label for the password! It will be accessable via pw command (pw )
"user": "", // The username to for your application (this will send via plain text)
"password": "", // The secret password for your application (this will send via onetimesecret)
"role_ids_with_access": [ "", "", "" ] // only if a member has one of this roles, he/she has access to get this password via pw
}
```## Run
Run ```index.js``` with ```npm start``` or ```node index.js```. \
Alternative you can use `npm run pm`, `npm run pm-restart` and `npm run pm-stop`.
This will use [pm2](https://discordjs.guide/improving-dev-environment/pm2.html) for executing