image from code wooo
Diffstat (limited to 'Main.gd')
-rw-r--r--Main.gd9
1 files changed, 7 insertions, 2 deletions
diff --git a/Main.gd b/Main.gd
index 612ab8f..205d0bc 100644
--- a/Main.gd
+++ b/Main.gd
@@ -57,7 +57,7 @@ func _on_message_create(bot: DiscordBot, message: Message, _channel: Dictionary)
code = lines.join("\n")
code = code.strip_edges()
-
+
if !code:
return
@@ -68,5 +68,10 @@ func _on_message_create(bot: DiscordBot, message: Message, _channel: Dictionary)
yield(get_tree(), "idle_frame")
var img: Image = viewport.save()
bot.reply(
- message, {"files": [{"name": "code.png", "media_type": "image/png", "data": img.save_png_to_buffer()}]}
+ message,
+ "Code:",
+ {
+ "files": [{"name": "code.png", "media_type": "image/png", "data": img.save_png_to_buffer()}],
+ "allowed_mentions": {"parse": [], "users": []}
+ }
)