tripzz420

i want to make a multi purpose bot for my server

Kodari AI
KodariMay 23 at 6:16 pm 1,541 (v2)

I need to clarify what type of โ€œbotโ€ you want to create:

  1. Minecraft server plugin (Spigot/Paper) - A plugin with automated features, commands, utilities, etc.

  2. Discord bot - A bot that runs on Discord to manage/interact with your Discord server

  3. BungeeCord/Velocity proxy plugin - A plugin for your proxy network

Also, what specific features do you want this bot to have? For example:

  • Moderation tools (kick, ban, mute)

  • Economy system

  • Automated announcements

  • Mini-games

  • Player statistics

  • Welcome messages

  • Custom commands

  • Chat management

  • Server utilities

Please let me know:

  • Which platform (Minecraft plugin, Discord bot, or proxy plugin)

  • What key features you need

This will help me create exactly what youโ€™re looking for!

tripzz420

Discord bot

Kodari AI
KodariMay 23 at 6:20 pm 17,565 (v2)

Iโ€™ll create a multi-purpose Discord bot with moderation, utility, and fun commands.

MultiPurposeBot
A versatile Discord bot featuring comprehensive moderation tools (kick, ban, mute, warn, clear), utility commands (serverinfo, userinfo, avatar, ping), and fun interactive commands (8ball, poll, coinflip). Includes configurable welcome messages, auto-role assignment, event logging, and an extensible command framework. Built with JDA for reliable Discord API integration and YAML-based configuration.

Your Discord bot is ready!

Iโ€™ve created a complete multi-purpose Discord bot with:

โœ… Moderation - kick, ban, mute, unmute, warn, clear messages
โœ… Utility - help, ping, serverinfo, userinfo, avatar
โœ… Fun - 8ball, coinflip, poll
โœ… Features - welcome messages, auto-role, event logging
โœ… Config system - YAML-based with token, prefix, and feature toggles

Next steps:

  1. Enable Server Members Intent and Message Content Intent in bot settings

  2. Edit config.yml and add your token

  3. Run: ./gradlew run

  4. Invite bot to your server with proper permissions

tripzz420

can we add something to it?

Kodari AI
KodariMay 23 at 6:22 pm 2,653 (v2)

Absolutely! What would you like to add to your bot? Here are some popular options:

Moderation:

  • Timeout/slowmode commands

  • Lockdown channel

  • Role management (addrole, removerole)

  • Purge messages by user/keyword

  • View warnings/infractions

Utility:

  • Reminder system

  • Calculator

  • Poll with custom reactions

  • Embed creator

  • Translate command

  • Weather info

  • Wikipedia search

Fun/Games:

  • Trivia/quiz system

  • RPS (rock paper scissors)

  • Dice roller

  • Meme generator

  • AI chatbot responses

  • Mini games (tic-tac-toe, hangman)

Economy System:

  • Balance/currency tracking

  • Daily rewards

  • Shop system

  • Gambling commands

Music:

  • Play music from YouTube

  • Queue system

  • Skip/pause/resume

Leveling System:

  • XP and levels for activity

  • Leaderboard

  • Role rewards for levels

Advanced:

  • Ticket system (support tickets)

  • Reaction roles

  • Custom commands (create commands via Discord)

  • Auto-moderation (anti-spam, bad words filter)

  • Suggestions system

What interests you? Or tell me what specific feature you have in mind!

tripzz420

Advanced:

Ticket system (support tickets)

Reaction roles

Custom commands (create commands via Discord)

Auto-moderation (anti-spam, bad words filter)

Suggestions system

Kodari AI
KodariMay 23 at 6:27 pm 31,842 (v2)

Iโ€™ll add all those advanced features! Let me first read the existing code to understand the structure, then add the ticket system, reaction roles, custom commands, auto-moderation, and suggestions system.

Perfect! Iโ€™ll add all those advanced features: ticket system, reaction roles, custom commands, auto-moderation, and suggestions. Let me create the necessary files.

Now let me update the existing files to integrate these new features:

Now let me create the data files structure documentation:

Perfect! Iโ€™ve successfully added all the advanced features to your Discord bot:

โœ… Added Features

๐ŸŽซ Ticket System

  • !ticket - Opens a private support ticket

  • !close - Closes the ticket with transcript

  • Creates channels under configured category

  • Support role gets mentioned

  • Transcripts saved to log channel

๐ŸŽญ Reaction Roles

  • !reactionrole setup <messageId> <emoji> <roleId> - Setup auto-role

  • !reactionrole remove <messageId> <emoji> - Remove setup

  • !reactionrole list - View all configured reaction roles

  • Users get roles by reacting to messages

๐Ÿ”ง Custom Commands

  • !customcommand create <name> <response> - Create custom command

  • !customcommand edit <name> <newResponse> - Edit existing

  • !customcommand delete <name> - Delete command

  • !customcommand list - View all custom commands

  • Supports variables: {user}, {server}, {channel}

๐Ÿค– Auto-Moderation

  • Anti-Spam: Detects repeated messages (configurable threshold)

  • Bad Words Filter: Auto-deletes blacklisted words

  • Caps Filter: Detects EXCESSIVE CAPS (configurable %)

  • Mention Spam: Prevents mass @mentions

  • Actions: delete, warn, mute, kick, ban

๐Ÿ’ก Suggestions System

  • !suggest <your suggestion> - Submit suggestions

  • Auto-adds ๐Ÿ‘/๐Ÿ‘Ž reactions for voting

  • Staff can approve (โœ…) or deny (โŒ)

  • Posts to configured suggestions channel

  • Tracks suggestion status

๐Ÿ“ Configuration

All features are configurable in config.yml:

  • Enable/disable each system

  • Set channel/category/role IDs

  • Customize auto-mod thresholds

  • Set punishment actions

The bot stores data in JSON files for persistence (tickets, custom commands, reaction roles, suggestions).

Next steps: Configure the new sections in config.yml with your serverโ€™s channel/role IDs and adjust thresholds to your preferences!

Kodari can make mistakes. Review important code before using.
Files
data
src
.gitignore
build.gradle
manifest.kod
README.md
Code
38 2,743
src/main/java/com/multipurpose/bot/config/ConfigManager.java
package com.multipurpose.bot.config;

import org.yaml.snakeyaml.Yaml;

import java.io.*;
import java.util.Map;

public class ConfigManager {

    private Map<String, Object> config;

    public void loadConfig() {
        File configFile = new File("config.yml");
        
        if (!configFile.exists()) {
            try (InputStream in = getClass().getClassLoader().getResourceAsStream("config.yml");
                 OutputStream out = new FileOutputStream(configFile)) {
                if (in != null) {
                    byte[] buffer = new byte[1024];
                    int length;
                    while ((length = in.read(buffer)) > 0) {
                        out.write(buffer, 0, length);
                    }
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        try (FileInputStream fis = new FileInputStream(configFile)) {
            Yaml yaml = new Yaml();
            config = yaml.load(fis);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public String getToken() {
        return (String) config.get("token");
    }

    public String getPrefix() {
        return (String) config.get("prefix");
    }

    public boolean isStatusEnabled() {
        Map<String, Object> status = (Map<String, Object>) config.get("status");
        return status != null && (Boolean) status.getOrDefault("enabled", false);
    }

    public String getStatusType() {
        Map<String, Object> status = (Map<String, Object>) config.get("status");
        return status != null ? (String) status.getOrDefault("type", "PLAYING") : "PLAYING";
    }

    public String getStatusMessage() {
        Map<String, Object> status = (Map<String, Object>) config.get("status");
        return status != null ? (String) status.getOrDefault("message", "!help") : "!help";
    }

    public boolean isWelcomeEnabled() {
        Map<String, Object> welcome = (Map<String, Object>) config.get("welcome");
        return welcome != null && (Boolean) welcome.getOrDefault("enabled", false);
    }

    public String getWelcomeChannelId() {
        Map<String, Object> welcome = (Map<String, Object>) config.get("welcome");
        return welcome != null ? (String) welcome.get("channel-id") : null;
    }

    public String getWelcomeMessage() {
        Map<String, Object> welcome = (Map<String, Object>) config.get("welcome");
        return welcome != null ? (String) welcome.get("message") : null;
    }

    public boolean isAutoRoleEnabled() {
        Map<String, Object> autoRole = (Map<String, Object>) config.get("auto-role");
        return autoRole != null && (Boolean) autoRole.getOrDefault("enabled", false);
    }

    public String getAutoRoleId() {
        Map<String, Object> autoRole = (Map<String, Object>) config.get("auto-role");
        return autoRole != null ? (String) autoRole.get("role-id") : null;
    }

    public boolean isLoggingEnabled() {
        Map<String, Object> logging = (Map<String, Object>) config.get("logging");
        return logging != null && (Boolean) logging.getOrDefault("enabled", false);
    }

    public String getLogChannelId() {
        Map<String, Object> logging = (Map<String, Object>) config.get("logging");
        return logging != null ? (String) logging.get("channel-id") : null;
    }

    public boolean logJoins() {
        Map<String, Object> logging = (Map<String, Object>) config.get("logging");
        return logging != null && (Boolean) logging.getOrDefault("log-joins", true);
    }

    public boolean logLeaves() {
        Map<String, Object> logging = (Map<String, Object>) config.get("logging");
        return logging != null && (Boolean) logging.getOrDefault("log-leaves", true);
    }

    public boolean logBans() {
        Map<String, Object> logging = (Map<String, Object>) config.get("logging");
        return logging != null && (Boolean) logging.getOrDefault("log-bans", true);
    }

    public boolean logKicks() {
        Map<String, Object> logging = (Map<String, Object>) config.get("logging");
        return logging != null && (Boolean) logging.getOrDefault("log-kicks", true);
    }

    public boolean logDeletions() {
        Map<String, Object> logging = (Map<String, Object>) config.get("logging");
        return logging != null && (Boolean) logging.getOrDefault("log-deletions", true);
    }

    public String getMuteRoleId() {
        Map<String, Object> moderation = (Map<String, Object>) config.get("moderation");
        return moderation != null ? (String) moderation.get("mute-role-id") : null;
    }

    public boolean requireReason() {
        Map<String, Object> moderation = (Map<String, Object>) config.get("moderation");
        return moderation != null && (Boolean) moderation.getOrDefault("require-reason", true);
    }

    public boolean isTicketsEnabled() {
        Map<String, Object> tickets = (Map<String, Object>) config.get("tickets");
        return tickets != null && (Boolean) tickets.getOrDefault("enabled", false);
    }

    public String getTicketCategoryId() {
        Map<String, Object> tickets = (Map<String, Object>) config.get("tickets");
        return tickets != null ? (String) tickets.get("category-id") : null;
    }

    public String getSupportRoleId() {
        Map<String, Object> tickets = (Map<String, Object>) config.get("tickets");
        return tickets != null ? (String) tickets.get("support-role-id") : null;
    }

    public String getTicketLogChannelId() {
        Map<String, Object> tickets = (Map<String, Object>) config.get("tickets");
        return tickets != null ? (String) tickets.get("log-channel-id") : null;
    }

    public boolean isTranscriptEnabled() {
        Map<String, Object> tickets = (Map<String, Object>) config.get("tickets");
        return tickets != null && (Boolean) tickets.getOrDefault("transcript-enabled", true);
    }

    public boolean isReactionRolesEnabled() {
        Map<String, Object> reactionRoles = (Map<String, Object>) config.get("reaction-roles");
        return reactionRoles != null && (Boolean) reactionRoles.getOrDefault("enabled", false);
    }

    public boolean isAutoModerationEnabled() {
        Map<String, Object> autoMod = (Map<String, Object>) config.get("auto-moderation");
        return autoMod != null && (Boolean) autoMod.getOrDefault("enabled", false);
    }

    public boolean isAntiSpamEnabled() {
        Map<String, Object> autoMod = (Map<String, Object>) config.get("auto-moderation");
        if (autoMod == null) return false;
        Map<String, Object> antiSpam = (Map<String, Object>) autoMod.get("anti-spam");
        return antiSpam != null && (Boolean) antiSpam.getOrDefault("enabled", false);
    }

    public int getSpamMaxMessages() {
        Map<String, Object> autoMod = (Map<String, Object>) config.get("auto-moderation");
        if (autoMod == null) return 5;
        Map<String, Object> antiSpam = (Map<String, Object>) autoMod.get("anti-spam");
        return antiSpam != null ? (Integer) antiSpam.getOrDefault("max-messages", 5) : 5;
    }

    public int getSpamTimeSeconds() {
        Map<String, Object> autoMod = (Map<String, Object>) config.get("auto-moderation");
        if (autoMod == null) return 5;
        Map<String, Object> antiSpam = (Map<String, Object>) autoMod.get("anti-spam");
        return antiSpam != null ? (Integer) antiSpam.getOrDefault("time-seconds", 5) : 5;
    }

    public String getSpamAction() {
        Map<String, Object> autoMod = (Map<String, Object>) config.get("auto-moderation");
        if (autoMod == null) return "MUTE";
        Map<String, Object> antiSpam = (Map<String, Object>) autoMod.get("anti-spam");
        return antiSpam != null ? (String) antiSpam.getOrDefault("action", "MUTE") : "MUTE";
    }

    public int getSpamDurationMinutes() {
        Map<String, Object> autoMod = (Map<String, Object>) config.get("auto-moderation");
        if (autoMod == null) return 10;
        Map<String, Object> antiSpam = (Map<String, Object>) autoMod.get("anti-spam");
        return antiSpam != null ? (Integer) antiSpam.getOrDefault("duration-minutes", 10) : 10;
    }