/ Projects / discordblocks /
DiscordBlocks is a block based programming language for Discord.
This project started off as a joke in 2017, and is still only exists as a proof of concept to this day.
Discord.js ❤ Blockly
Back in 2017, blocks were manually created by hand.
This was not helpful, as Discord.js would have many methods that would need to be implemented one by one. In the
1.0 release of DiscordBlocks alone, there are 26 files defining only 13 blocks.
Thankfully, the developers of Discord.js have
React ❤ Blockly
In the latest version of DiscordBlocks, React/Redux is used to manage the state of the program. Blockly, however does not interact well with React.
In order to let both React and Blockly play in the same HTML document without
<iframe>, the Blockly
<div> is outside the React controlled environment. The footer was achieved by using CSS to push it below the Blockly
div, whilst still being part of the React environment.