The process for adding Discord announcements to the online archive can be partially automated using the following steps:
- Install the Vencord client mod for Discord.
- Go to
Settings > Vencord Settings > Pluginsand enable the "ViewRaw" plugin. - Hover over the message you want to add and click the
<>button. This will display a modal containing the raw message contents. - Click the "Copy Message JSON" button.
- In the Flashpoint website repository under
utilities, create a file nameddiscord_message.json. - Paste your clipboard contents into the file and save.
- Open the terminal under
utilitiesand rundeno run -A import_discord_message.js. This will automatically extract the message's contents, download any attachments and add an entry todiscord.json. - Repeat steps 3-7 for any other messages.
- Discord's implementation of Markdown is more lenient than most Markdown parsers. You may need to make some changes to the message's Markdown in order for it to render properly.
- You will need to update channel names, custom emojis, and pinged users/roles to use their actual names instead of their raw IDs.
- The name of the message's author should reflect the name they are most commonly known by. If the author's name needs to be changed, update the respective message's
authorfield indiscord.json.- Exceptions should only be made if the username is directly correlated to the message's contents, which is typically only the case for April Fools' jokes.
- In order for custom emojis to be displayed, you will need to download them and add them to the Markdown parser's list of custom emojis. Follow these instructions:
- Go to
https://cdn.discordapp.com/emojis/<id>.png, with<id>representing the emoji's raw ID. - Download the image to
/static/images/news/discord/emojis, with its filename being the emoji's name. - Open
nsfuncs.js, and undermarkedEmoji, add the emoji to theemojisproperty. The field should be the emoji's name, while the value should be its filename.
- Go to