Compare commits

..

2 Commits

Author SHA1 Message Date
059de4981c add: readme 2023-10-10 13:19:57 +00:00
ed73e9db37 remove price and quantity and print the embed 2023-10-10 12:50:19 +00:00
2 changed files with 49 additions and 1 deletions

47
README.md Normal file
View File

@ -0,0 +1,47 @@
# PyMenu
PyMenu is a discord bot to create grocery list
## Feature
- Add items to your list by sending a message to a channel within the `GROCERY_LIST` category.
- Support for multiple lists, one for each channel.
- Easily remove items from your list by clicking on the check mark reaction.
## Screenshots
![](https://media.discordapp.net/attachments/501841539161522176/1161285342914170970/image.png?ex=6537be41&is=65254941&hm=3ace3096fd0a5d66cb8bfc8c744dbd79dcba84fc02cbaf7a02b01ffbcc7ed58d&=)
## Planned feature
- Set prices for items.
- Specify quantities for items.
- Customize the category name.
- Add images.
- Complete the Dockerfile for easy deployment
- Implement statistics for nerd
## Requirements
- make
- g++
- [DPP](https://dpp.dev)
## Installation
- install `make`
- install `g++`
- [install dpp and its dependencies](https://dpp.dev/installing.html)
- Clone the project:
``` bash
git clone https://git.chauvet.pro/starnakin/PyMenuBOT/
cd PyMenuBOT
```
- Compile the project:
``` bash
make
```
- Launch the executable:
``` bash
./PyMenu
```
## Setting up on Your Discord Server
- Add the bot to your server (using [the official instance](https://discord.com/oauth2/authorize?client_id=818558187443716137&scope=bot+applications.commands&permissions=10737428544))
- Create a category called `listes-de-course`
- Inside this category, create channels for each of your grocery lists (e.g., `Wallmart`).
- You can now start adding items to your lists by sending messages in the respective channels.

View File

@ -29,12 +29,13 @@ int main()
dpp::embed embed = dpp::embed() dpp::embed embed = dpp::embed()
.set_color(dpp::colors::sea_green) .set_color(dpp::colors::sea_green)
.set_title(event.msg.content) .set_title(event.msg.content)
.add_field("Quantite", "1", true) //.add_field("Quantite", "1", true)
//.add_field("Prix", "3.29") //.add_field("Prix", "3.29")
.set_author(event.msg.author.username, "", "") .set_author(event.msg.author.username, "", "")
.set_footer(dpp::embed_footer().set_text("PyMenuVersion:2.0")); .set_footer(dpp::embed_footer().set_text("PyMenuVersion:2.0"));
dpp::message msg(event.msg.channel_id, embed); dpp::message msg(event.msg.channel_id, embed);
event.send(msg);
bot.message_delete(event.msg.id, event.msg.channel_id); bot.message_delete(event.msg.id, event.msg.channel_id);
} }