BraveNetwork / LinBot

Open source, general-purpose Discord chat bot written in C#
https://bravenetwork.github.io/
MIT License
2 stars 0 forks source link

Custom Embeds #8

Closed 23nd closed 6 years ago

23nd commented 6 years ago

The .NET API has an Embed Builder; NadekoBot has a Custom Reaction feature. I think it'd be cool to have a Custom Embed feature that is capable of sending a specific RichEmbed object in response to a CustomReaction command.

Example:

.buildcustomembed ?mytagname
.setcustomembed title ?mytagname My Embed Title
.setcustomembed color ?mytagname #ff0000
.setcustomembed thumb ?mytagname https://i.imgur.com/ix5zypC.png
.setcustomembed desc ?mytagname Use `?mytagname item` to learn more about an `item` listed below:
.addcustomembed field ?mytagname id=0 | name=Bot Terms | value = module, command, guild, channel, user
.addcustomembed field ?mytagname id=1 | name=Fruits | value = Apple, Banana, Orange
.addcustomembed field ?mytagname id=2 | name=Delete Me | value = by setting to empty
.setcustomembed field ?mytagname id=2 | name= | value =

.addcustomreaction .embed ?mytagname

?mytagname

Sample Embed Visualization

23nd commented 6 years ago

(stahl) I'm thinking of creating new commands for custom embed reactions. Compared from normal text-based custom reactions stored as a CustomReaction object to the database, we can store the EmbedBuilder objects that we usually use to send embeds. Problem now is regarding how linbot handle databases and to make the embedreacts either global or server-specific

ghost commented 6 years ago

This is already possible.

http://nadekobot.me/embedbuilder/ type in data here, press GetJson

then copy paste the json into the custom reaction

.acr myembed {"title":"Hi mr","description":"warped2713","color":7458112}

when you type myembed You will get a rich embed response