A simple script that lets you bookmark messages in Discord with reactions to channel(s) of your choosing!
In case you want to bookmark messages, specially attachments and stuff(memes) in Discord itself for retreiving them later all in one place.
This script works by downloading attachments if any, and then uploading them to the channel you specify. I made it download them without sending the attachment URLs because if the original author deletes the message, they are no longer accessible.
I recommend having a private server for having all of your bookmark channels. I might consider adding some self-commands for sending bookmarks by filtering through indexes and such and sending them.
This might seem useless, but some might find it useful idk. If you do, leave a star <3
Context: Setting up 2 bookmark channels for the emojis ⭐ and 🔖 for #memes and #important respectively
-
discord-py-self - renamed branch(
selfcord
) -
loguru - for logging
-
your discord account token
-
How to get your token?
- Open https://discord.com/app on your web browser
- Open Developer Tools(ctrl + shift + i)
- Head over to the Applications tab & Toggle Device Toolbar
- Search for 'token' and copy the value
If you need further instructions please refer to https://pcstrike.com/how-to-get-discord-token/
-
Clone the repo
git clone https://github.com/yeti2006/discord-react-to-bookmark && cd discord-react-to-bookmark
Install requirements via pip
pip install -r requirements.txt
Configure
config.ini
(see below)
# Welcome to the Configuration!
[info]
discord_account_token = your_account_token
logs_channel_id = 0
message_format = **(_{server}_)** | {author} | {time}{newline}`{message.content}`
Run the script
python -m bm
ℹ️ To exit the script press ctrl + c
The config.ini
file exists for you to add as many reaction emojis as you want and send the messages you react messages with to channels you specify.
To add an emoji, you need to create a block with brackets []
and type in an emoji unicode inside them. After that, it requires to values inside that block:
-
channel_id
- The ID of the text channel you want the bookmarked message sent to -
message_format
- The format of the message. Use variables with{}
. You can leave this empty to use the default value:-
**{author}**(_{server}_) - {time}{newline}{message.content}
-
Tag | Value | Attributes |
---|---|---|
author |
The author of the message | Member |
time |
The time the message was created | None |
server |
The guild of the message | Guild |
message |
The message | Message |
emoji |
The emoji you reacted with | None |
newline |
Appends a new line to the string | None |