Skip to content

Feat/leave server - #238

Open
0skar11 wants to merge 454 commits into
codebymitch:mainfrom
0skar11:feat/leave-server
Open

0skar11 wants to merge 454 commits into
codebymitch:mainfrom
0skar11:feat/leave-server

Conversation

@0skar11

@0skar11 0skar11 commented Oct 30, 2026

Copy link
Copy Markdown

No description provided.

claude and others added 30 commits September 24, 2026 17:13
A game whose lobby is cancelled, that doesn't get enough players, or that
is stopped with وقف now deletes every message it posted (lobby, rounds,
turns, votes) and the command that started it, in one bulk delete when
the bot can manage messages. The "stopped" notice and the وقف message go
after 5 seconds. Finished games keep their messages and results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YYuHKfzR5pDJuMWpu8FSAQ
…h AFK kicks

- Mafia is one short message per phase: 🎭 at the start (each player sees
  only their own role, privately), 🌙 at night (a private menu for the
  mafia, doctor and detective), and one vote menu by day with a live
  "voted n/m" count instead of a message per vote.
- Every phase is 20 seconds. Whoever doesn't press 🎭, pick at night or
  vote by day is kicked for AFK with their role shown, and gets no CC even
  if their team wins.
- The other games' choices are 20 seconds too, with AFK kicks: roulette
  turn (was 30s), chairs (was 10s, players who never pressed are marked
  AFK), rock-paper-scissors (was 30s) and XO moves (was 60s; the other
  player now wins and gets the solo CC).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YYuHKfzR5pDJuMWpu8FSAQ
The music is gone. Each round shows one chair less than players, grey and
not pressable, under "استعد". At random moments the chairs flash red for a
second or two: pressing one then knocks you out. At a random moment they
turn green and everyone races to sit (20 seconds; whoever doesn't get a
chair is out, whoever never pressed is kicked for AFK). The number of
chairs is recounted when they turn green, after the red presses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YYuHKfzR5pDJuMWpu8FSAQ
Chairs: grey chairs that flash red (trap) and turn green at random
Stopping a game (وقف or the panel button) and the lobby's start / cancel
buttons now take the game's host or a trusted member: the server owners,
bot owners and the anti-nuke trusted users/roles, the same people who can
lift a hard ban. Staff with Manage Messages can no longer stop games.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YYuHKfzR5pDJuMWpu8FSAQ
Let only the game's host and trusted members control a game
The bot posts one Top CC board in the games channel at startup (when it
isn't there yet) and edits it every 5 minutes. The post's ID is saved in
the guild config so restarts keep editing the same post, and the board is
told apart from top cc replies by its footer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfcZ2Xhx9184M7tjzXV4hf
xo and fight now open with an invite: the challenged member gets 20
seconds to press قبول or رفض, and the challenger can take it back with
رفض. The game starts only after قبول (the invite message becomes the
board / the fight). A refused, cancelled or unanswered invite says so
and is deleted after 5 seconds with the command that sent it. fight is
now allowed in the games channel too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YYuHKfzR5pDJuMWpu8FSAQ
Add live Top CC leaderboard board to games channel
Games against another member need the invite accepted first
Group خمن and solo رقم now pick a number from 0 to 200. In خمن each
player gets 6 guesses per round (their 6th wrong guess gets 🚫 and
later ones are ignored); solo رقم keeps its 6 tries. Panel, slash
command descriptions and docs updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfcZ2Xhx9184M7tjzXV4hf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfcZ2Xhx9184M7tjzXV4hf
…in av

- Embed titles lose their emojis (src/utils/embeds.js), so no board message
  ever matched '📢 Event Manager — …'. Every board message was treated as a
  retired role's and deleted, and the edit-only refresh added in #65 then
  posted nothing back. Titles are now compared without emojis, each role's
  board message ID is remembered (boardMessage helper, like the other
  boards), and startup re-posts a role's message only when it is really
  gone, so the Event Manager board comes back without duplicates. (report #67)
- av now opens the avatar command (it pointed at autoverify) and shows the
  profile picture, the server avatar when different, and the banner (or
  the banner color when there is none). (report #69)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vhhmd4ToFiDmBoxbPy4Moh
Fix the permission board deleting its own messages, and show banners in av
Posts the server rules (Arabic, numbered, grouped by topic) in the chosen
channel or the current one, and edits the existing post in place when the
rules change instead of posting a second copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013z3CrstGtG9hPCdpPc2wjf
Posts the 15 rules to channel 1547311665458978990 with an @everyone ping
(edits of an existing post never ping again). Uses a plain embed object
so the section icons survive the emoji stripping in src/utils/embeds.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013z3CrstGtG9hPCdpPc2wjf
Add server rules board publishing feature
The board embeds were built with EmbedBuilder, and src/utils/embeds.js drops
builder footers, so the bot never recognized its own board and posted it again
on every restart. The board is now one message (one plain embed per staff role)
whose footer survives.

On the next startup the bot deletes every message in the permission channel,
its own included, and posts the board once (tracked with a reset version in the
guild config). After that it never posts there: startup and
/publish-board admin-permissions only edit the existing board message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjKtcuNBRoxQyQebSA4uh
Rules board: say that unlisted wrongdoing isn't allowed either
The rules post pings @everyone. The guard only skipped bots because
messageCreate returns early for bot authors; make the exemption explicit
so a reorder there can't delete the bot's own announcements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013z3CrstGtG9hPCdpPc2wjf
Let the bot's own @everyone ping through the mention guard
Consolidate staff permission board into single message
Both use the group game lobby and pay CC to the top 3 like the other games.
Players hide in squares the bot posts (clicks are private, they can move
until the 30 s hiding time ends; anyone who doesn't hide is placed at
random).

- غميضه: each turn a random player still in opens a square (not their own).
  Someone hiding there is out; an empty square is revealed and the game
  goes on. AFK players are out. Last one hidden wins. (report #79)
- صيد: a random player is the hunter, the rest are sheep hiding among fake
  sheep (one more fake than real). The hunter wins by catching every sheep
  before the fakes run out; the sheep win when every fake has been shot (an
  AFK turn counts as a wasted shot).

Commands: غميضه / صيد (or /game hide, /game hunt), plus buttons in the
games panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vhhmd4ToFiDmBoxbPy4Moh
Add the غميضه (hide & seek) and صيد (hunt) group games
غميضه now has 3 empty squares per player and صيد 3 fake sheep per real
sheep (3 players → 9 empty squares). Grids over 25 squares continue in
a second message since a message holds at most 25 buttons, so the
player limits stay at 12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfcZ2Xhx9184M7tjzXV4hf
Hide & seek and hunt: 3 empty squares for every hider
The games move to a separate games bot. This bot keeps the CC system
(daily, cc, cctop, the Top CC board) and switches its own games off
without deleting anything:

- src/config/games.js: GAMES_ENABLED (off by default). While off, the
  game commands (game, solo, rps, xo, fight) are not loaded, registered
  or listed in help, the games channel stops deleting other messages so
  the games bot can work there, and old panel game buttons say the games
  moved. GAMES_ENABLED=true brings everything back.
- src/services/cc/ccApi.js: /api/cc on the existing web server, guarded
  by CC_API_TOKEN, for the games bot to read balances and the top, pay
  group games and solo wins with our reward rules, add custom rewards
  and spend CC. requestId makes retries safe.
- Tests for the off state and the API; the existing games tests run
  with the switch on. Docs updated with the API guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T4Qz7EdHbZrKxxetmh5fzu
claude and others added 29 commits October 9, 2026 02:03
…rite (report #222)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vhhmd4ToFiDmBoxbPy4Moh
…erous (reports #218, #219)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vhhmd4ToFiDmBoxbPy4Moh
The link stays saved in docs/ideas-later.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vhhmd4ToFiDmBoxbPy4Moh
Danger list (خطر), report channel writers, invite rewards without the stay, remove the free-llm-apis skill
Danger list: take the member's admin roles off, give them back on خطر شيل
… (report #227)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vhhmd4ToFiDmBoxbPy4Moh
Music retries failed songs, mention group command
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vhhmd4ToFiDmBoxbPy4Moh
Daily streak with its own room, invite reward 5000 CC
…very message, a daily reminder

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vhhmd4ToFiDmBoxbPy4Moh
Streak: pictures and GIFs in the streak room only, a reply to every message, a daily reminder
Streak: 250 CC a day, growing every 7 days
…ther repo now)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vhhmd4ToFiDmBoxbPy4Moh
…tHub refused

.env.example still had REPORTS_REPO=0skar11/-, so a host set up from it kept
overriding the fixed default from #234 and every report got a 404 from the new
0skar11/- repo. The old name is now mapped to 0skar11/DISbot with a warning.

GitHub failures are logged as one line with the HTTP status, the repo and a hint
(token, permission, repo access) instead of the raw axios error, which could also
carry the Authorization header into the logs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reports: send the old REPORTS_REPO=0skar11/- to DISbot and log why GitHub refused
Streak: fixed room 1562578413217124402, never create a new one
…ed (our server)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vhhmd4ToFiDmBoxbPy4Moh
Purge: a count and a confirm word, no confirmation message
…r only)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Servers board: live list of the bot's servers in the fixed room
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@0skar11
0skar11 requested a review from codebymitch as a code owner October 30, 2026 14:57

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants