Published script

nickname_demo

Changes your server nickname after explicit confirmation

u0/nickname_demo@1 Custom command v1 0

Readme

Demonstrates the current member nickname API. Run the installed command with confirm to change your own nickname to Macchi test. Macchi still checks the capability, current bot permission, and bot role hierarchy before applying the change.

Source

Showing version 1

Changelog: Current self-nickname example with explicit command confirmation.

if ctx.args ~= "confirm" then
  macchi.reply("Run with `confirm` to set your nickname to Macchi test.")
  return
end

if ctx.member == nil then
  macchi.reply("A server member context is required.")
  return
end

ctx.member:changeNick("Macchi test")
macchi.reply("Nickname updated.")