naider 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/SPEC.naide CHANGED
@@ -385,6 +385,23 @@ prompt summarize {lang: "en"}:
385
385
  # str answer = await ai.ask(p)
386
386
 
387
387
 
388
+ # ---- Discord Bot ----
389
+ # bot構文でDiscord Botを簡単に作成
390
+ bot myBot token "YOUR_TOKEN":
391
+ on "ready":
392
+ log "Bot is online!"
393
+ on "message" (msg):
394
+ if msg.content == "!ping":
395
+ msg.reply("Pong!")
396
+ slash "hello" "挨拶します":
397
+ interaction.reply("こんにちは!")
398
+ slash "ask" "AIに質問":
399
+ str answer = await ai.ask(interaction.options.getString("question"))
400
+ interaction.reply(answer)
401
+
402
+ # Node.js → discord.js, Python → discord.py, Bun → discord.js
403
+
404
+
388
405
  # ---- スケジュールタスク ----
389
406
  every "5m":
390
407
  log "cleanup running"