Mimu Bot
  • overview
  • command list
  • ⚙️Settings
    • getting started
      • currency / economy
      • activity + pick spawn
      • greet / leave / boost messages
      • deny commands
      • custom formatting
  • Currency System
    • getting started
    • setting up a server shop
  • 💸global currency
    • tickets
      • pets
        • taking care of your pet
    • stars
      • activity classes
  • autoresponder
    • your first autoresponder
    • guides
      • beginner i: using simple placeholders
      • beginner ii: using simple functions
      • intermediate i: ranges and making choices
      • intermediate ii: locked choices
      • advanced i: different matchmodes
      • advanced ii: using user arguments
      • advanced iii: modifying inventory and using args
      • expert i: static button responders
      • expert ii: instanced button responders
    • resources
      • variables - placeholders & functions
      • examples
        • custom currency command examples
          • .bake command
          • .bake command with items
          • .harvest command
          • .stealcookie command
          • .crime command
          • .steal [user] [amount] command
          • .sell command
        • manager/moderation commands
          • self-verification system
            • click a button to verify
            • type "i agree" to verify
          • manual verification system
          • self assignable roles
            • button roles
            • command roles (type +role)
            • command x button roles
          • .roleadd [user] [role] command
          • antiswear/blacklisted words
          • anti link/advertising
          • change to appropriate nickname command
          • .setnick [user] [nickname] command
          • click to disable pings (e.g. partner pings)
        • utility/fun commands
          • .serverinfo command
          • .nick [nickname] command
          • .suggest [text] command
          • .say commands
          • embed reaction command
          • embed action command (user arguments)
          • partner manager reward system
          • would you rather/.topic command
          • .poke [user] command
          • .8ball [text] command
          • mimu, rate [thing] command
          • .muteroulette [user] [user]... command
  • 🛄embeds
    • your first embed
    • embed guide
      • general/nonspecific embed
      • greet/welcome embed
      • leave/goodbye embed
      • rules embed
      • boost embed
  • 🔗quick links
    • ♡ support server
    • ♡ status page
    • ♡ feedback site
  • other
    • [03/2024] v8.10 - leaving patreon and restructuring supporter tiers
      • changelog & details
      • terms of purchasing, refunds, etc.
      • swapping over as an existing patron: early patron badge & more!
      • why are you moving away? what about the donation site?
Powered by GitBook
On this page

Was this helpful?

  1. autoresponder
  2. guides

beginner ii: using simple functions

let's learn how functions work in mimu's autoresponders so we can make commands that do actions!

Previousbeginner i: using simple placeholdersNextintermediate i: ranges and making choices

Last updated 1 year ago

Was this helpful?

✎ what are functions?

  • a function is something that manipulates, or does an action.

  • these variables allow your autoresponders to have more than just a static response/reply.

  • let's try out a simple autoresponder that gives the user 10 currency with a cooldown of 1 minute.

/autoresponder add trigger:give me 10 reply:{modifybal:+10} {cooldown:60} okay, i've given you 10 {server_currency}, you have {user_balance} now!

  • in this above autoresponder, {modifybal:} takes an amount, and modifies the user's balance by +10.

  • the {cooldown:} function accepts a number in seconds as the cooldown.

  • finally, we have a simple response and placeholder as the response.

it is good practice / habit for you to run functions before the response. this is because in order for some placeholders to be updated, you have to use the function early on. here's an example: /autoresponder add trigger: mimu give me money! reply: your old balance: {user_balance} {server_currency} {modifybal:1000} your new balance: {user_balance} {server_currency} in this scenario, it will provide the old balance, then show the new balance after the balance has been modified. in addition, in the future, when using chooses, ranges, you will find you have to use the functions before the placeholder, to define the choice / range, etc.

  • if you did it right, you should now have something like below!

  • let's try out another example! this time, we want to make mimu give us a role and respond in a colored embed when the user types +admirer.

/autoresponder add trigger:+admirer reply:{embed:#ec948a}{addrole: @mimu admirer} hi cutie! i've given you the @mimu admirer role !

  • in the above response, {embed:} accepts either no input, a color (we put in #ec948a), or a premade embed. since we put in an embed with a specified color, the text hi cutie! i've given you the @mimu admirer role will be embedded

  • {addrole:} accepts an input of a role for you to add to the user. in this case, we're adding the "mimu admirer" role! this input also accepts role IDs as well c:

  • the remaining text is the textual response.

  • finally, let's try another example! let's make a mod only command that pings the @chat revive role with a cooldown of 5 minutes.

using cooldowns in your ARs? please note they will show up in the user's/cooldowns!

/autoresponder add trigger:.chatrevive reply:{requirerole: @𐐚 ┇ moddies}{cooldown:300} @chat revive

  • the {requirerole:} function allows you to limit it to people with the inputted role. if they don't have the role, the autoresponder will respond with the below error.

  • you can then create a cooldown with the {cooldown:} function. we put 300 because 300 seconds = 5 minutes.

there are A LOT of functions for different purposes, from embedding, to redirecting to channels. check out our for a full list!

variable functions list
autoresponders giving you currency rewards