You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Abeille is a Discord bot providing statistics and insights for guilds. It maintains a database with the messages from each connected guild, in order to perform efficient and various search operations (since Discord does not provide any API to perform search operations).
5
+
> A powerful Discord bot for collecting and analyzing message statistics and insights for your guilds.
6
6
7
-
There is no public Abeille bot. You should run your own Abeille bot instance by following the steps below.
Abeille is a Discord bot providing statistics and insights for guilds. It maintains a database (one for each guild) with the messages from each connected guild, in order to perform efficient and various search operations (since Discord does not provide any API to perform search operations).
35
+
36
+
> **Note**: For now, there is no public Abeille bot. You should run your own Abeille bot instance by following the steps below.
19
37
20
38
## Features
21
39
22
-
- Saves messages from tracked guilds while using pseudonymization
23
-
- Provides slash commands to graph trending expressions, show random messages...
40
+
- Saves messages from tracked guilds while using pseudonymization.
41
+
- Provides slash commands to graph trending expressions, show random messages.
42
+
- Activity analysis including user rankings and comparison.
43
+
- Message trend visualization and statistical analysis.
44
+
- Admin commands for channel management and data handling.
45
+
- Strong privacy controls with data export and deletion options.
46
+
- Full localization support (currently English and French).
47
+
- Database operations optimized with SQLite FTS5 for efficient text search.
48
+
- User data pseudonymization for privacy protection.
49
+
50
+
## Dependencies
51
+
52
+
Abeille is built using the following open source libraries:
53
+
54
+
-[discord.js](https://github.com/discordjs/discord.js) - Discord API client
|`DISCORD_TOKEN`| The token for your Discord bot. You can obtain this from the Discord Developer Portal after creating a bot application. |`your-bot-token`|_None_|
41
79
|`GUILD_ID`|_(Optional, recommended for development)_ The ID of the Discord guild (server) you want the bot to operate in. You can find this by enabling Developer Mode in Discord and right-clicking on the server name. |`123456789012345678`|_None_|
42
-
|`OWNER_ID`| Your Discord ID. Used for specials commands. |`123456789012345678`|_None_|
43
-
|`HASHNAME`|A unique identifier used for pseudonymizing user data. Choose a random string. |`sha256`|`sha512`|
80
+
|`OWNER_ID`| Your Discord ID. Used for special commands.|`123456789012345678`|_None_|
81
+
|`HASHNAME`|The hash algorithm used for hmac pseudonymization (if you don't know what to choose, leave the default value).|`sha256`|`sha512`|
44
82
|`ITER`| The number of iterations for hashing operations. A higher value increases security but may impact performance. |`10000`|`100000`|
45
-
|`SALT`| A random string used to add additional security to the hashing process. Generate a secure random string. Recommended length is 16 (cf. [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) )|`random-salt-string`|`bee-default-salt`|
83
+
|`SALT`| A random string used to add additional security to the hashing process. Generate a secure random string. Recommended length is 16 (cf. [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf)).|`random-salt-string`|`bee-default-salt`|
46
84
47
85
### Run
48
86
@@ -52,19 +90,77 @@ You can now start Abeille by running the following command:
52
90
docker compose up -d --pull always
53
91
```
54
92
55
-
> By default, the `compose.yaml` file will pull the `latest` tag, which is pushed to Docker Hub whenever the `master` branch is updated.
56
-
> So you may have to run `docker compose down/up` from time to time in order to get the latest features (and run `docker image prune -a` to make some space).
93
+
> **Note**: By default, the `compose.yaml` file will pull the `latest` tag, which is pushed to Docker Hub whenever the `master` branch is updated.
94
+
> You may have to run `docker compose down && docker compose up -d` from time to time in order to get the latest features (and run `docker image prune -a` to make some space).
57
95
58
96
Check logs by running:
59
97
60
98
```bash
61
99
docker logs abeille
62
100
```
63
101
64
-
## Develop
102
+
## Development
65
103
66
104
1. Clone project
67
105
2. Install bun from [Bun website](https://bun.sh/)
68
-
3. Copy and rename `.env.template` to `.env.local` and complete variables (cf. Environnement variables configuration)
106
+
3. Copy and rename `.env.template` to `.env.local` and complete variables (see [Environment Variables](#environment-variables) configuration)
69
107
4. Run `bun install` to install dependencies
70
108
5. Run `bun dev` to start your bot
109
+
110
+
## Commands
111
+
112
+
Abeille offers various slash commands grouped by category:
113
+
114
+
### Activity Commands
115
+
116
+
-`/trend` - Visualize trends of specific words or phrases over time.
117
+
-`/rank` - Show user activity rankings for specific expressions.
118
+
-`/compare` - Compare activity between different expressions.
119
+
120
+
### Message Commands
121
+
122
+
-`/random` - Display a random message from the guild.
123
+
124
+
### Admin Commands
125
+
126
+
-`/channels` - List all tracked channels and their message counts.
127
+
-`/purge` - Clean deleted messages from the database. (_may be removed in the future_)
128
+
-`/save` - Force a complete save of all messages. (_may be removed in the future_)
129
+
-`/savechannel` - Force save messages from a specific channel. (_may be removed in the future_)
130
+
131
+
### Privacy Commands
132
+
133
+
-`/delete` - Delete a specific message from Abeille's database (if you want to be sure that Abeille has taken into account the Discord deletion).
134
+
-`/export` - Download your personal data collected by Abeille (in CSV).
135
+
-`/register` - Opt-in to allow Abeille to store and display your username in rankings.
136
+
-`/unregister` - Opt-out and remove your username from Abeille's storage (and future rankings).
137
+
138
+
### Developer Commands (_may be removed in the future_)
139
+
140
+
-`/db` - Database management operations.
141
+
-`/logging` - Configure logging level.
142
+
143
+
### Utility Commands
144
+
145
+
-`/ping` - Check if the bot is responsive.
146
+
147
+
## Contributing
148
+
149
+
Contributions to Abeille are welcome! Here's how you can contribute:
150
+
151
+
1. Fork the repository
152
+
2. Create a feature branch: `git checkout -b my-new-feature`
153
+
3. Commit your changes: `git commit -am 'Add some feature'`
154
+
4. Push to the branch: `git push origin my-new-feature`
155
+
5. Submit a pull request
156
+
157
+
Please make sure your code follows the existing code style.
158
+
159
+
## Documentation
160
+
161
+
For more detailed information about Abeille, please see the following documentation:
162
+
163
+
-[Architecture Overview](docs/ARCHITECTURE.md) - Learn about Abeille's internal structure
164
+
-[Security Best Practices](docs/SECURITY.md) - Important security recommendations
165
+
166
+
For developers interested in the database structure, see the [SaveScenarios.drawio](docs/SaveScenarios.drawio) diagram.
0 commit comments