]> git.taranathan.com Git - moo-bot.git/commitdiff
cross
authorTaran Nathan <moogoesmeow123@gmail.com>
Sun, 23 Aug 2026 22:09:44 +0000 (15:09 -0700)
committerTaran Nathan <moogoesmeow123@gmail.com>
Sun, 23 Aug 2026 22:33:57 +0000 (15:33 -0700)
.gitignore
bot.nimble
cross.sh [new file with mode: 0755]
nimble.paths
src/bot.nim

index 17ea45deafa2871fe59f2fb50fb423d602d02a8f..e2f0700677b71f6e91570d042c10b904bdfd53e5 100644 (file)
@@ -1,2 +1,5 @@
 bot
 .env
+nimble.develop
+nimble.paths
+nimbledeps
index c13f43e3b7d968f9816ee7c22f8535cff530b878..03c1fbd7273eaa3585490b53a869ad04771e0b49 100644 (file)
@@ -14,5 +14,4 @@ requires "nim >= 2.2.10"
 requires "json_serialization"
 requires "dimscord"
 
-requires "random >= 0.5.7"
 requires "dotenv >= 2.0.0"
diff --git a/cross.sh b/cross.sh
new file mode 100755 (executable)
index 0000000..e8892a4
--- /dev/null
+++ b/cross.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+cat >/tmp/zigcc <<'EOF'
+#!/usr/bin/env sh
+exec zig cc "$@"
+EOF
+chmod +x /tmp/zigcc
+
+cd /home/moo/Projects/Nim/bot
+nim c -d:release \
+  --cpu:amd64 --os:linux --cc:clang \
+  --clang.exe:/tmp/zigcc \
+  --clang.linkerexe:/tmp/zigcc \
+  --passC:"-target x86_64-linux-musl" \
+  --passL:"-target x86_64-linux-musl" \
+  src/bot.nim
index ce5773683e323c836a33c1074086674b007b4a02..90fe3eb55bdf04d7a6e2ab0395da9d11910d9368 100644 (file)
@@ -4,7 +4,6 @@
 --path:"/home/moo/.nimble/pkgs2/unicodedb-0.13.2-739102d885d99bb4571b1955f5f12aee423c935b"
 --path:"/home/moo/.nimble/pkgs2/dimscord-1.8.0-ea3dd7aabde21b532afb6d3f4c5e6bb159adc7bc"
 --path:"/home/moo/.nimble/pkgs2/zippy-0.10.20-fae5430d597432ea2916a6d45dee53542784d51e"
---path:"/home/moo/.nimble/pkgs2/random-0.5.7-a848bbc060f57e69820d40c6f9b26bac296dd106"
 --path:"/home/moo/.nimble/pkgs2/results-0.5.1-a9c011f74bc9ed5c91103917b9f382b12e82a9e7"
 --path:"/home/moo/.nimble/pkgs2/jsony-1.1.6-b28964a93a3cf7248126ba39047593cd63a3aa6d"
 --path:"/home/moo/.nimble/pkgs2/json_serialization-0.4.4-8b3115354104858a0ac9019356fb29720529c2bd"
index dc99043e604a491c212628e65c304d0fb3babc2c..ca177c8234ca40acc129e15f95b448689538202f 100644 (file)
@@ -54,6 +54,10 @@ proc messageCreate(s: Shard, m: Message) {.event(discord).} =
     let emojis = ["🥵", "🥶", "🤯", "🤓", "🫦", "🪱", "🦧"]
     await m.react(emojis[rand(emojis.high)])
 
+  if m.mention_users.len > 0:
+    if m.mention_users[0].username == "moo bot":
+      discard await m.reply("wassup")
+
   if m.content.contains("simon says kys"):
     discard await channel.send("bye bye")
     quit(0)