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/README.md +1052 -1021
- package/SPEC.naide +17 -0
- package/bin/naide.js +879 -879
- package/lsp/server.js +348 -347
- package/package.json +58 -56
- package/src/generator-bun.js +513 -513
- package/src/generator-python.js +1519 -1449
- package/src/generator.js +77 -0
- package/src/index.js +103 -103
- package/src/parser.js +64 -0
- package/src/tokens.js +4 -0
- package/vscode-naide/syntaxes/naide.tmLanguage.json +1 -1
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"
|