First Time Setup

This is a step by step walkthrough of how to set up 42 on your server.
This page is mostly because we (the Kiwi Hangout users) keep getting the same set of questions.


Setting up the +welcome command

There are a few parts to this. If you want to skip ahead to the parts you want:


To set up a welcome message.

Decide what to send

We do this with the +welcome message command.

If you do not care about the content: +welcome message basic
If you do want to choose the content: +welcome message tag

"Wait, 'tag'? why tag?"
It's tag because you use a tag to define the content. Specifically, the welcome tag.
You can also use most of yna as well as the extra tags {user} and {@user}. Here is an example:

+tag welcome "Welcome to {server.name} {@user}. Please read the rules in #rules and enjoy your stay."
 

Decide when to send

A lot of members and servers do not like using welcome bots that send a message the moment someone joins. 42 provides a few additional events to listen out for.
+welcome delay message will make 42 wait until a the new user sends a message.
+welcome delay typing will make 42 intercept new users as they start typing their first message.

 

Lastly, Decide where to send

42 can send the message to several different places. these are:
+welcome dest here which sets the target channel to the channel that this command was called in.
+welcome dest owner asks 42 to DM the server owner. This is rarely recommended.
+welcome dest new sends the DM to the new user. It may be worth keeping in mind that some users have DMs turned off.
+welcome dest here as long as you set a when like above, the message will be sent to the channel the user first interacted with.

A lot of the time, it is preferable to send the message either into a special welcome channel or into the first channel a message is sent to.

 

Lets put it all together. To turn on welcome messages, we need a where, a when, and a what. Here is a full example of everything you need to do.

+tag welcome "Welcome to {server.name} {@user}"
I have changed the server's welcome tag.
+welcome delay typing
I have changed the welcome message to Use +tag welcome
+welcome message tag
I have changed the welcome delay to Wait for typing
+welcome dest message
I have changed the welcome dest to Member's first message

"Whoa, 4 commands? Jeez!"
Fine let me show you a shorter way:

+tag welcome "Welcome to {server.name} {@user}"
I have changed the server's welcome tag.
+welcome setup tag message typing
I have changed the welcome message to Use +tag welcome
I have changed the welcome dest to Member's first message
I have changed the welcome delay to Wait for typing

And that's all there is. When a new user joins, 42 will wait until they start typing, then send them a message.

"Okay, that's great, but what if I want to change it?"
You can run more welcome commands at any time. These will overwrite the current settings.

"Cool, now turn it off."
Alright, to see what you need to type to turn it off, you can use +welcome info

+welcome info
  - My messaging behaviours are Use +tag welcome and Member's first channel
    - Use +welcome message none to disable
  - My welcome delay behaviour is Wait for typing
    - Use +welcome delay instant to disable

To set up a welcome role.

Do you want to create a role or use a preset role?

Because if you wanted a new role, that part is easy.
+welcome role new. That is it. When a new user joins, they get their own role.
If you wanted to go even further, +welcome role newcol will automatically assign a random* colour to the role too.

*The colour is seeded by ID, so the colour is different for each user, but if a user is on multiple newcol servers, they'll be the same across them all.

Big note: Discord has a hard limit of 250 roles. It is absolutely not recommended to have 42 create new roles if your server is larger than a few dozen people or if your server is public.

 

Alright, lets get to it then

Setting up a welcome role is easy. All you need to do is tell 42 which role to assign to new members.

The welcome command does not create new roles. So you need to make sure the role you want to use already exists.

 

Once you've made your role, you can set it to be assigned to new members.
+welcome role give 'role name'
Make sure that you type in the roles name exactly, and quote it if it has spaces. Mentioning the role won't work.
There, now 42 will assign our welcome role to members when they join the server. Unlike messages, this is always done instantly.


Setting up role bindings

There are 4 other things 42 can do with roles: Givemes, Giveyous, Colourmes and Voice roles.
Colourmes are listed first because they are a lot simpler overall.

Note: None of the commands below create roles. You will need to create the roles you want to use in this command.
Note 2: 42 cannot assign roles unless they are below her in the role list. i.e. her highest role (probably "Bots") needs to be above your giveme and colourme roles.
Note 3: You cannot use roles that are above you in the role hierarchy to create givemes or colourmes.
Note 4: All role names in the following commands are exact names, quoted if the role name contains spaces. 42 cannot understand role mentions.


To set up colourmes.

Reminder: You need to create your colour roles first.
It's usually a good idea to make these roles have no permissions.

Creating a colourme is as simple as 1 command.
+colourme create 'name' 'role'

Say your role is a green shade called "Grass", you would use +give... "green" "Grass"

 

"Okay, but I have 20 roles that I want to turn into colourmes. This is going to take forever."

42 provides a feature called "chaining", which lets you make multiple colourmes at once. An example shall we?

+colourme create red Fire blue Water green Grass grey Dark orange Fighting pink Psychic
I have added +colourme red to assign Fire.
I have added +colourme blue to assign Water.
I have added +colourme green to assign Grass.
I have added +colourme grey to assign Dark.
I have added +colourme orange to assign Fighting.
I have added +colourme pink to assign Psychic.
 

Okay, you've made a mistake and turned a role into a colourme that you didn't want to

Have no fear, its very easy to remove colourme.
+colourme delete 'name'
This can be chained to delete lots of colourmes at once too! +colourme delete red green blue

 

Recap

*Creates a set of roles to use as colourmes.
+colourme create red Fire
I have added +colourme red to assign Fire.
+colourme create blue Water green Grass ping Psychic
I have added +colourme blue to assign Water.
I have added +colourme green to assign Grass.
I have added +colourme ping to assign Psychic.
+colourme delete ping
I have removed that colourme.
+colourme create pink Psychic
I have added +colourme pink to assign Psychic.

To set up giveyous.

Setting giveyous is more or less identical to colourmes though with a couple of additional notes.
To create the role, just call +giveyou create 'name' 'role', or chain multiple role creates together like colourmes.

42 actually defines 3 special giveyous that are tied to special shortcut commands.
I'll list them off and their intended uses, though you can use them for any purpose you deem fit.
  • member: A special role used to denote someone as a trusted community member. Useable with +member
  • mute: A special role used to block rowdy members from sending messages in the server. Useable with +mute
  • roleban: A special role used to remove a member's access and confine them to a designated roleban channel. Useable with +roleban
    When I get my next big update, this shortcut command will also remove all other roles from the user, and give them back after a second call to roleban.

"And I suppose deleting these is the same too?

Yep, just call +giveyou delete 'name' and it'll be gone.

Recap

*Creates a set of roles to use as giveyous.
+giveyou create quality 'Quality Contributor'
I have added +giveyou quality to assign Quality Contributor.
+giveyou create member Supporter mute Silenced roleban Punished
I have added +giveyou member to assign Supporter.
I have added +giveyou mute to assign Silenced.
I have added +giveyou roleban to assign Punished.

To set up givemes.

Givemes are the most versitile part of the roles system. However this also makes them the most complex to set up.

The simple way to use the command is just like colourmes, so lets describe that part first.

Our use case will simply be "My guild needs an opt-in NSFW role."

 

So lets create our giveme first.

+giveme create nsfw "NSFW Access"
Thats it. Now anyone can use +giveme nsfw to get this role.

You may have already noticed the same flaws that I'm about to bring up... anyone can get this role. Lets change that shall we?

 

Restricting access

There are 2 role-based restrictions you can put on givemes. "Require" roles and "Ignore" roles.

  • The user must have ALL require roles.
  • AND The user must NOT have ANY ignore roles.

Lets expand our case. "Before a member can be given NSFW, they must first be a MEMBER, and cannot be a CHILD or MUTED."

So how do we go about doing this?
Firstly, we need to add "Member" as a required role, then we need to add "Child" and "Muted" as ignored roles.
This is 3 more commands.

+giverole giveme require nsfw Member
+giverole giveme ignore nsfw Child
+giverole giveme ignore nsfw Muted

 

More restrictions?

There is one more restriction you can put on a giveme. This is a "Delay".
Basically, a user must have been on the server for more than the delay time before they can get the role.
How about we update our case again: "A member must be 2 weeks old before being allowed NSFW access."

Well, this is as simple as the rest to do.
+giverole giveme delay nsfw 2w
If we wanted, we could pass in 14d instead, since the bot takes "d", "w" or "m".

 

"Okay, thats what, like 5 commands? to set up 1 role? thats insane!"

Alright then. This is where things get silly. You can chain on a giveme create too!
Instead of just creating lots of roles at a time, chaining a giveme lets you set up the role and its restrictions all at once.

Lets use our case above as an example. "Grant "NSFW Access" if a user has Member, does not have Child or Muted, and is 2 weeks old."

(Here is what is happening)
+giveme create nsfw "NSFW Access"
        require      Member
        ignore       Child
        ignore       Muted
        delay        2w
(Here is the command)
*Creates "NSFW Access", "Member", "Child" and "Muted" roles
+giverole giveme create nsfw "NSFW Access" require Member ignore Child ignore Muted delay 2w
I have set +giveme nsfw to assign NSFW Access.
I have set +giveme nsfw to require users to have Member.
I have set +giveme nsfw to reject users with Child.
I have set +giveme nsfw to reject users with Muted.
I have set the delay period for this giveme to 14 days.

To set up voice roles.

Setting up the modlog

Okay, so you want to use 42 as a modlog.
Very simple first question. Do you already have a channel you already use as a modlog? Like for instance, another bot's audit log?
If yes: Go to that channel and run +modlog here.
If no: Just enter +modlog and fill in the prompt.

Alright then, now you have a modlog, and if 42 created the channel, it will be locked so that only staff can see it.

 

"So what can this thing do?"

There is a list of settings here but if you don't want to read that, here is an overview:

Your modlog by default will track:

member_join

member_leave

member_ban

member_unban

message_delete

channel_list_update

server_update

Additionally, if 42 created your modlog, these settings will also be placed in the channel topic, but disabled:

message_edit

name_changed

nick_changed

allow_reports

 

"Youre just spouting words at me now. What does all this mean."

Well its simple, you can edit the channel topic to decide what 42 logs in the channel.
Say for instance, you actually did want to start tracking name changes, you can write
name_changed = true
into the channel topic.

 

"Alright then. I uh, I have 3 different bots fighting over the channel topic"

Thats an easy fix. If you want a line that only 42 will react to, you can add "42" to the start of the line.
42 name_changed = true

 

Predefined modlog settings

Here is a set of modlog settings you can use if you dont feel like setting it up yourself.

Log all the things
    log_all = true
Reports aren't modlog
    allow_reports = false
Commands arent server based
    command_called = false

Turn off all the things
    member_join = false
    member_leave = false
    member_ban = false
    member_unban = false
    channel_list_update = false
    server_update = false
Only catch messages deleted between 1 and 60 secs
(This stops the bot's deleting commands being caught)
    deleted_before = 60
    deleted_after = 1
Catch edits too
(This also ignores typo fixes)
    message_edit = true
    min_edit_distance = 10

Turn off what we don't want
    member_ban = false
    member_unban = false
    message_delete = false
    channel_list_update = false
    server_update = false

We don't need these three
    message_delete = false
    channel_list_update = false
    server_update = false
However we do need names
    name_changed = true
    nick_changed = true

Turn off what we don't want
    member_join = false
    member_leave = false
    message_delete = false
    channel_list_update = false
    server_update = false
Allow reports from users
    allow_reports = true

Turn off what we don't need
    member_join = false
    member_leave = false
    member_ban = false
    member_unban = false
    message_delete = false
    channel_list_update = false
    server_update = false
Turn on command logging
Enable developer mode in appearance settings to copy channel IDs
    command_called = true
    show_full_command = true
    bot_channels = 1234, 1234
    show_failed_calls = true

Just copy and paste the given set of settings into the channel topic of your modlog channel and everything will work.


Return to top.