Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord Support #13

Closed
5 of 7 tasks
VenomStyx opened this issue Jan 12, 2022 · 5 comments
Closed
5 of 7 tasks

Discord Support #13

VenomStyx opened this issue Jan 12, 2022 · 5 comments
Assignees

Comments

@VenomStyx
Copy link
Member

VenomStyx commented Jan 12, 2022

Overview

Discord Integration

TODO

VenomStyx added a commit that referenced this issue Mar 5, 2022
- #32 Added Content Manager, a class that will manage all the content posting.
- #13 Created Discord Account class, which is a child of Account.
- Added more specific function to the Account class for use with Discord & others.
- #13 Added Discord support for regular posts, still needs attachment support.
- #10 Added Content Manager to the server class, which now uses it to publish posts.
- Added some functionality to the Post class for easier data management.

Thanks @nathan-fiscaletti for the help 🙏

Oh, and slava 🇺🇦

Co-Authored-By: Nathan Fiscaletti <nate.fiscaletti@gmail.com>
@VenomStyx
Copy link
Member Author

Alright so I switched my path from trying to implement a full discord bot to simple webhooks. They're easier to manage and they provide all the features that this needs. No reason to sit around waiting for a bot to spin up when you can send a quick post request.

Currently text posts are done, however posts with attachments still need work. The request throws no errors but also doesn't return anything.

🤷‍♂️

VenomStyx added a commit that referenced this issue Mar 9, 2022
Added Discord Media Support, only to find out that it doesn't work with files over 8mb 😞

Best option for sharing media on Discord is likely through a link, which, now that I think of it, is typically how I share media on Discord anyway.

Co-Authored-By: Nathan Fiscaletti <nate.fiscaletti@gmail.com>
@VenomStyx
Copy link
Member Author

It's pretty much working for Discord at the moment, though I'm not considering it truly functional until it can mention users & roles. Post formatting might be necessary as well.

@VenomStyx VenomStyx self-assigned this Mar 21, 2022
@VenomStyx
Copy link
Member Author

Discord webhooks have an 8mb upload limit.

VenomStyx added a commit that referenced this issue Apr 22, 2022
Cleaning up files for future progress.

Added a python webhook library for a temporary quick solution.
VenomStyx added a commit that referenced this issue Apr 23, 2022
- Changed the way settings were handled in preparation for more. Now they check if encrypted and auto use the encrypted function if so. This will make it so that most settings can be added without needing a new section in the settings widget.

- Added Setting Display Names & Setting Type Definitions. use the `display_name_` prefix in settings to set the display name for a setting. Use the `hidden_` prefix to create a hidden input. Display Name definition can be anywhere before the setting value.

- Fixed bug where s3 settings couldn't be updated.

- Updated Guide to show new encrypted setting access process.

- Lots of cleanup

- Added initial variable for global mention IDs & Mention Tag start/ends.
VenomStyx added a commit that referenced this issue Apr 26, 2022
- Created functionality for Discord Mentions & laid the foundation for other platforms.

- Added build_mentions_list to the Account class. Returns a list of mentions using the defined settings.

- Added replace_mentions to the DiscordAccount class. Returns a list of [Updated Post Content, Updated Mentions List]. Automatically replaces global ids with their associated platform id & adds propper formatting in post content for Discord.

- Added mention tag settings

- Fixed missing "encrypted_" prefix in config.py for processing_delay_in_seconds.

- Ensured all settings were using the "get_setting_value" function.
@VenomStyx
Copy link
Member Author

Initial Discord Support complete!

Will need to add post formatting system (#37) in order to do much better. Also need to address post object serialization (#26) so that posts can be extended properly.

VenomStyx added a commit that referenced this issue Apr 29, 2022
Fixed logic for discord replace mentions function (Was improperly formatting the data).

Modified discord response code logic for webhook to return proper ID

Removed default formatting from title to allow user defined until post rules system.

Added function for getting a platform ID from platform name in the global mentions object.

Added temp reference to post ID in content manager. This logic eventually needs to move to the post object, but it needs to be serialized on save first.
@Shingii
Copy link

Shingii commented Nov 13, 2024

how can i run this project on personal server?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants