# Fun

## <mark style="color:blue;">Introduction</mark>

The Fun configuration file (`fun.json`) controls entertainment and engagement features including the leveling system, counting game, starboard, birthdays, and daily question/quote systems.

***

## <mark style="color:blue;">Counting Game</mark>

The counting game is a channel activity where users count sequentially (1, 2, 3, etc.). You can configure rules and penalties for mistakes.

### <mark style="color:yellow;">enabled</mark>

**Type:** Boolean

Enables or disables the counting game feature.

```json
enabled: true
```

***

### <mark style="color:yellow;">alternating\_users</mark>

**Type:** Boolean

When enabled, consecutive numbers must be sent by different users.

```json
alternating_users: false
```

**When `true`:**

* User A sends "1"
* User A cannot send "2" (must be a different user)
* User B must send "2"

**When `false`:**

* Any user can send any number in sequence

***

### <mark style="color:yellow;">reset\_on\_failure</mark>

**Type:** Boolean

Whether the counter resets to 0 when someone sends the wrong number.

```json
reset_on_failure: true
```

**When `true`:** Counter resets on mistakes\
**When `false`:** Counter stays at current number

***

### <mark style="color:yellow;">timeout\_user\_on\_failure</mark>

**Type:** Boolean

Whether to timeout users who send the wrong number.

```json
timeout_user_on_failure: true
```

**When `true`:** User is timed out for the duration specified in `timeout_length`\
**When `false`:** No timeout penalty applied

***

### <mark style="color:yellow;">timeout\_length</mark>

**Type:** String

Duration of timeout when a user fails. Only applies if `timeout_user_on_failure` is `true`.

```json
timeout_length: "15m"
```

**Format:** `"15m"`, `"1h"`, `"30s"`, etc.

***

## <mark style="color:blue;">Level System</mark>

### <mark style="color:yellow;">enabled</mark>

**Type:** Boolean

Enables or disables the entire leveling system.

```json
level_system: {
    enabled: true,
}
```

***

### <mark style="color:yellow;">level\_up</mark>

**Type:** String (Formula)

Formula to calculate XP required to reach the next level.

```json
level_up: "%level% * 5 + 20"
```

**Placeholder:** `%level%` = Current level

**Example Calculations:**

* Level 0 → 1: `0 * 5 + 20 = 20 XP`
* Level 1 → 2: `1 * 5 + 20 = 25 XP`
* Level 5 → 6: `5 * 5 + 20 = 45 XP`

You can use basic math operators: `+`, `-`, `*`, `/`, `()`

***

### <mark style="color:yellow;">XP Gain Settings</mark>

Controls how much XP users earn per action.

#### <mark style="color:orange;">min & max</mark>

**Type:** String (Number)

Random XP range awarded per message or voice activity.

```json
xp_gain: {
    min: "1",
    max: "3",
}
```

Users gain between 1-3 XP randomly with each eligible action.

***

#### <mark style="color:orange;">cooldown\_in\_seconds</mark>

**Type:** Number

Cooldown period between XP gains from messages.

```json
cooldown_in_seconds: 5
```

Users can only gain XP from messages once every 5 seconds (prevents spam).

***

#### <mark style="color:orange;">voice\_support</mark>

**Type:** Boolean

Whether users can gain XP from being in voice channels.

```json
voice_support: false
```

**When `true`:** Users gain XP while in voice channels\
**When `false`:** Only message XP is awarded

{% hint style="info" %}
**Note:** Voice channel requirements (minimum users, etc.) are configured in the Core configuration file under `calltime_requirement_users`.
{% endhint %}

***

#### <mark style="color:orange;">voice\_time\_in\_seconds</mark>

**Type:** Number

How many seconds a user must spend in voice to gain XP.

```json
voice_time_in_seconds: 20
```

Users gain XP (random between min/max) every 20 seconds in voice.

***

### <mark style="color:yellow;">Blacklists</mark>

**Type:** Object

Exclude specific users, channels, or categories from gaining XP.

```json
blacklists: {
    users: ["123456789012345678"],
    channels: ["234567890123456789"],
    categories: ["345678901234567890"],
}
```

**users** - Array of user IDs who cannot gain XP\
**channels** - Array of channel IDs where XP gain is disabled\
**categories** - Array of category IDs where XP gain is disabled

***

### <mark style="color:yellow;">Notification</mark>

**Type:** Object

Configure how level-up notifications are sent.

```json
notification: {
    reply: true,
    channel: false,
}
```

**reply** - When `true`, bot replies to the user's message with level-up notification\
**channel** - When `true`, sends notification to a specific channel (configured elsewhere)

{% hint style="info" %}
**Tip:** Enable `reply: true` for immediate feedback. Use `channel: true` if you want all level-ups posted to a dedicated channel.
{% endhint %}

***

### <mark style="color:yellow;">Role Rewards</mark>

**Type:** Object

Automatically assign roles when users reach specific levels.

#### <mark style="color:orange;">enabled</mark>

**Type:** Boolean

Whether role rewards are active.

```json
role_rewards: {
    enabled: false,
}
```

***

#### <mark style="color:orange;">keep\_all\_roles</mark>

**Type:** Boolean

Determines if users keep all earned roles or only the highest.

```json
keep_all_roles: true
```

**When `true`:** User has all roles they've earned (Level 5 role + Level 10 role)\
**When `false`:** User only has their highest level role (Level 10 role only, Level 5 role removed)

***

#### <mark style="color:orange;">roles</mark>

**Type:** Array of Objects

Define which roles are awarded at which levels.

```json
roles: [
    {
        level: 5,
        role_id: "804354034135597066",
    },
    {
        level: 10,
        role_id: "804354033338286130",
    },
    {
        level: 25,
        role_id: "123456789012345678",
    },
]
```

**level** - Level required to earn the role\
**role\_id** - Discord role ID to assign

***

## <mark style="color:blue;">Starboard</mark>

The starboard feature reposts popular messages to a dedicated channel when they receive enough reactions.

### <mark style="color:yellow;">enabled</mark>

**Type:** Boolean

Enables or disables the starboard feature.

```json
starboard: {
    enabled: false,
}
```

***

### <mark style="color:yellow;">emoji</mark>

**Type:** String

The emoji users must react with to add messages to the starboard.

```json
emoji: "⭐"
```

Can be any Unicode emoji or custom emoji ID.

***

### <mark style="color:yellow;">reactions</mark>

**Type:** Number

Number of reactions required before a message is added to the starboard.

```json
reactions: 10
```

Once a message receives 10 ⭐ reactions, it's posted to the starboard channel.

***

### <mark style="color:yellow;">whitelisted\_channels</mark>

**Type:** Array of Strings

List of channel IDs where starboard is active. Leave empty to allow all channels.

```json
whitelisted_channels: []
```

***

### <mark style="color:yellow;">whitelisted\_categories</mark>

**Type:** Array of Strings

List of category IDs where starboard is active.

```json
whitelisted_categories: ["804354056575254558"]
```

Only messages in channels within these categories can be starred.

{% hint style="info" %}
**Note:** If both `whitelisted_channels` and `whitelisted_categories` are empty, starboard works in all channels. Use these to limit starboard to specific areas of your server.
{% endhint %}

***

## <mark style="color:blue;">Birthday</mark>

### <mark style="color:yellow;">birthday\_set\_cooldown</mark>

**Type:** String

Cooldown period for setting or changing a birthday.

```json
birthday_set_cooldown: "1y"
```

**Format:** `"1y"` (1 year), `"6m"` (6 months), etc.

{% hint style="warning" %}
**Recommendation:** Keep this at `"1y"` to prevent abuse. Users should only be able to set their birthday once per year.
{% endhint %}

***

### <mark style="color:yellow;">channel\_notification</mark>

**Type:** Boolean

Whether to send birthday notifications to a specific channel.

```json
channel_notification: true
```

**When `true`:** Bot posts birthday messages to the configured birthday channel\
**When `false`:** No automatic birthday messages

***

### <mark style="color:yellow;">special\_role</mark>

**Type:** Object

Assign a special role to users on their birthday.

```json
special_role: {
    enabled: false,
    role_id: "804354034135597066",
}
```

**enabled** - Whether birthday role is active\
**role\_id** - Role to assign on user's birthday

The role is automatically removed at the end of their birthday (24 hours).

***

## <mark style="color:blue;">Quote of the Day</mark>

Automatically post inspirational quotes at scheduled times.

### <mark style="color:yellow;">enabled</mark>

**Type:** Boolean

Enables or disables the quote of the day feature.

```json
quote_of_the_day: {
    enabled: true,
}
```

***

### <mark style="color:yellow;">weekly</mark>

**Type:** Object

Schedule when quotes are posted for each day of the week.

```json
weekly: {
    monday: ["12:00", "18:00"],
    tuesday: ["14:22"],
    wednesday: ["14:00"],
    thursday: ["10:00"],
    friday: ["12:00"],
    saturday: ["20:00"],
    sunday: [],
}
```

**Format:** 24-hour time (`"HH:MM"`)\
**Timezone:** UTC\
**Multiple times:** Add multiple times per day as array elements\
**No quotes:** Use empty array `[]` for days without quotes

{% hint style="warning" %}
**Important:** Use `"0:00"` for midnight, not `"24:00"`. Time is based on your set timezone.
{% endhint %}

***

### <mark style="color:yellow;">mention\_roles</mark>

**Type:** Array of Strings

List of role IDs to mention when a quote is posted.

```json
mention_roles: []
```

Leave empty for no mentions, or add role IDs to ping specific roles.

***

### <mark style="color:yellow;">create\_thread</mark>

**Type:** Boolean

Whether to create a discussion thread for each quote.

```json
create_thread: true
```

**When `true`:** A thread is created where users can discuss the quote\
**When `false`:** Quote is posted without a thread

***

## <mark style="color:blue;">Question of the Day</mark>

Post daily questions to engage your community.

### <mark style="color:yellow;">enabled</mark>

**Type:** Boolean

Enables or disables the question of the day feature.

```json
question_of_the_day: {
    enabled: false,
}
```

***

### <mark style="color:yellow;">weekly</mark>

**Type:** Object

Schedule when questions are posted for each day of the week.

```json
weekly: {
    monday: ["12:00", "18:00"],
    tuesday: ["16:00"],
    wednesday: ["14:00"],
    thursday: ["10:00"],
    friday: ["12:00"],
    saturday: ["20:00"],
    sunday: [],
}
```

Same format as quote of the day. Time is based on your set timezone.

***

### <mark style="color:yellow;">mention\_roles</mark>

**Type:** Array of Strings

List of role IDs to mention when a question is posted.

```json
mention_roles: ['804354037662220289']
```

***

### <mark style="color:yellow;">create\_thread</mark>

**Type:** Boolean

Whether to create a discussion thread for each question.

```json
create_thread: true
```

***

### <mark style="color:yellow;">dataset</mark>

**Type:** Array of Strings

List of questions to randomly choose from when posting.

```json
dataset: [
    "What is your favorite color?",
    "What is your favorite food?",
    "What is your dream vacation destination?",
    "If you could have any superpower, what would it be?",
]
```

The bot randomly selects one question from this list for each scheduled post. Add as many questions as you like.

***

## <mark style="color:blue;">Activity Check</mark>

### <mark style="color:yellow;">activity\_check\_disable\_mention</mark>

**Type:** Boolean

When the activity check command is used, this controls whether the targeted user is mentioned.

```json
activity_check_disable_mention: false
```

**When `true`:** User is not mentioned in the activity check message\
**When `false`:** User is mentioned (@username) in the activity check

***

## <mark style="color:blue;">Customized Dick Size</mark>

The `/dicksize` command generates random sizes, but you can set custom values for specific users.

### <mark style="color:yellow;">customized\_dicksize</mark>

**Type:** Array of Objects

List of users with custom dick sizes.

```json
customized_dicksize: [
    {
        user_id: "707336356786864211",
        size: 7.2,
    },
    {
        user_id: "123456789012345678",
        size: 12.5,
    },
]
```

**user\_id** - Discord user ID\
**size** - Custom size value (number)

When these users use the `/dicksize` command, they'll always get their configured value instead of a random one.

***

## <mark style="color:blue;">Complete Configuration Example</mark>

Here's a complete, production-ready fun configuration:

```json
{
    config: {
        counting_game: {
            enabled: true,
            alternating_users: true,
            reset_on_failure: true,
            timeout_user_on_failure: true,
            timeout_length: "15m",
        },

        level_system: {
            enabled: true,
            level_up: "%level% * 5 + 20",
            xp_gain: {
                min: "1",
                max: "3",
                cooldown_in_seconds: 5,
                voice_support: true,
                voice_time_in_seconds: 20,
            },
            blacklists: {
                users: [],
                channels: [],
                categories: [],
            },
            notification: {
                reply: true,
                channel: false,
            },
            role_rewards: {
                enabled: true,
                keep_all_roles: true,
                roles: [
                    {
                        level: 5,
                        role_id: "804354034135597066",
                    },
                    {
                        level: 10,
                        role_id: "804354033338286130",
                    },
                ]
            }
        },

        starboard: {
            enabled: true,
            emoji: "⭐",
            reactions: 10,
            whitelisted_channels: [],
            whitelisted_categories: ["804354056575254558"],
        },

        birthday: {
            birthday_set_cooldown: "1y",
            channel_notification: true,
            special_role: {
                enabled: true,
                role_id: "804354034135597066",
            },
        },

        quote_of_the_day: {
            enabled: true,
            weekly: {
                monday: ["12:00"],
                tuesday: ["12:00"],
                wednesday: ["12:00"],
                thursday: ["12:00"],
                friday: ["12:00"],
                saturday: [],
                sunday: [],
            },
            mention_roles: [],
            create_thread: true,
        },

        question_of_the_day: {
            enabled: true,
            weekly: {
                monday: ["18:00"],
                tuesday: ["18:00"],
                wednesday: ["18:00"],
                thursday: ["18:00"],
                friday: ["18:00"],
                saturday: [],
                sunday: [],
            },
            mention_roles: [],
            create_thread: true,
            dataset: [
                "What is your favorite color?",
                "What is your favorite food?",
                "What is your favorite movie?",
                "What is your dream vacation destination?",
                "If you could have any superpower, what would it be?",
            ],
        },

        activity_check_disable_mention: false,

        customized_dicksize: []
    },
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iynxdev.com/configuration-files/fun.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
