MCCTeam / Minecraft-Console-Client

Lightweight console for Minecraft chat and automated scripts
https://mccteam.github.io
Other
1.68k stars 402 forks source link

[Problem] remotely control ingame error #2505

Open Johannes099 opened 1 year ago

Johannes099 commented 1 year ago

Prerequisites

Minecraft Version

1.19.2

Console Client Version

MinecraftClient-20230510-217-win-x64.exe

Expected Behavior

i do /msg Stephan117 quit that the bot runs this/that/the command

Actual Behavior

I cant controll my bot remotely i set the /tell to the servers /msg bt if i do /msg Stephan117 quit ingame than it doesnt do anything pls help me

Steps to Reproduce the bug

  1. ?

Attach screenshot here (If applicable)

No response

Anythings that could help diagnosing the bug

No response

Device

Desktop

Operating System

Windows

Server Address (If applicable)

landania.net

milutinke commented 1 year ago

First, set yourself as a bot owner in the configuration file, make sure that you have typed your main account name without a typo. Make sure the RemoteControl bot is actually enabled. PS: Make sure that the client is closed when you're changing the settings. Then, if the server has a different chat format than a vanilla server or Essentials plugin, you need to update the regex in the ChatFormat section. If that is the case, read this: https://mccteam.github.io/guide/configuration.html#chat-format-section

Johannes099 commented 1 year ago

and how to know with chat format the server uses?

milutinke commented 1 year ago

and how to know with chat format the server uses?

You can obviously see it in the chat, if it is not vanilla or Essentials plugin, you can use Regex to write it.

Johannes099 commented 1 year ago

how to see it its just a normal server with plugins and i dont know how i could use regex there! and u cant write wit hregex you can only search in text!!! so pleas help me!

milutinke commented 1 year ago

how to see it its just a normal server with plugins and i dont know how i could use regex there! and u cant write wit hregex you can only search in text!!! so pleas help me!

Post exact command you are using to send the command to the bot. Post your MinecraftClient.ini and make sure to remove your login credentials. Post screenshots of how the private message looks like on the server you are tying to use the Remote Control .

Johannes099 commented 1 year ago
  1. /msg Stephan117
  2. Startup Config File

    Please do not record extraneous data in this file as it will be overwritten by MCC.

    New to Minecraft Console Client? Check out this document: https://mccteam.github.io/g/conf.html

    Want to upgrade to a newer version? See https://github.com/MCCTeam/Minecraft-Console-Client/#download

    [Head] "Current Version" = "GitHub build 217, built on 2023-05-10 from commit 4ff7712" "Latest Version" = "GitHub build 217, built on 2023-05-10"

[Main] [Main.General] Account = { Login = "", Password = "" } # Anmeldung = E-Mail oder Name. Verwenden Sie "-" als Passwort für den Offline-Modus. Lassen Sie das Feld leer, um den Benutzer bei jedem Start zur Eingabe aufzufordern. Server = { Host = "landania.net" } # Die Adresse des Spiel-Servers kann entweder mit einem Domain-Namen oder einer IP-Adresse im Feld "Host" eingegeben werden. (Das Feld "Port" kann gelöscht werden, da es automatisch aufgelöst wird.) AccountType = "microsoft" # Kontotyp: "mojang" ODER "microsoft". Beeinflusst auch die interaktive Anmeldung in der Konsole. Method = "browser" # Microsoft-Konto-Anmeldeverfahren: "mcc" ODER "Browser". Wenn die Anmeldung immer fehlschlägt, versuchen Sie bitte einmal den "Browser" zu verwenden.

Make sure you understand what each setting does before changing anything!

[Main.Advanced] Language = "de_at" # Fill in with in-game locale code, check https://mccteam.github.io/r/l-code.html LoadMccTranslation = true # Load translations applied to MCC when available, turn it off to use English only. ConsoleTitle = "%username%@%serverip% - Minecraft Console Client" InternalCmdChar = "slash" # Use "none", "slash"(/) or "backslash"(). MessageCooldown = 1.0 # Controls the minimum interval (in seconds) between sending each message to the server. BotOwners = [ "Johennes", "8d90b1df-fe0b-4c28-9a71-635267fc8910", "8d90b1dffe0b4c289a71635267fc8910", ] # Set the owner of the bot. /!\ Server admins can impersonate owners! MinecraftVersion = "1.19.4" # Use "auto" or "1.X.X" values. Allows to skip server info retrieval. EnableForge = "no" # Use "auto", "no" or "force". Force-enabling only works for MC 1.13+. BrandInfo = "mcc" # Use "mcc", "vanilla" or "none". This is how MCC identifies itself to the server. ChatbotLogFile = "" # Leave empty for no logfile. PrivateMsgsCmdName = "msg" # For remote control of the bot. ShowSystemMessages = true # System messages for server ops. ShowXPBarMessages = true # Nachrichten, die über der XP-Leiste angezeigt werden. Setzen Sie dies auf "false", wenn die XP-Leiste zu viele Nachrichten anzeigt. ShowChatLinks = true # Decode links embedded in chat messages and show them in console. ShowInventoryLayout = true # Show inventory layout as ASCII art in inventory command. TerrainAndMovements = false # Verwendet mehr Arbeitsspeicher, CPU und Bandbreite, aber erlaubt es dir zu bewegen. MoveHeadWhileWalking = true # Enable head movement while walking to avoid anti-cheat triggers. MovementSpeed = 2 # A movement speed higher than 2 may be considered cheating. TemporaryFixBadpacket = false # Vorübergehende Lösung für das Badpacket-Problem auf einigen Servern. Sie müssen zuerst "TerrainAndMovements" aktivieren. InventoryHandling = false # Toggle inventory handling. EntityHandling = false # Toggle entity handling. SessionCache = "disk" # How to retain session tokens. Use "none", "memory" or "disk". ProfileKeyCache = "disk" # How to retain profile key. Use "none", "memory" or "disk". ResolveSrvRecords = "fast" # Use "no", "fast" (5s timeout), or "yes". Required for joining some servers. PlayerHeadAsIcon = true # Only works on Windows XP-8 or Windows 10 with old console. ExitOnFailure = false # Whether to exit directly when an error occurs, for using MCC in non-interactive scripts. CacheScript = true # Cache compiled scripts for faster load on low-end devices. Timestamps = false # Zeitstempel den Chat-Nachrichten voranstellen. AutoRespawn = false # Toggle auto respawn if client player was dead (make sure your spawn point is safe). MinecraftRealms = false # Enable support for joining Minecraft Realms worlds. TcpTimeout = 30 # Anpassung des TCP-Verbindungstimeouts mit dem Server (in Sekunden). EnableEmoji = true # If turned off, the emoji will be replaced with a simpler character (for /chunk status). MinTerminalWidth = 16 # The minimum width used when calculating the image size from the width of the terminal. MinTerminalHeight = 10 # The minimum height to use when calculating the image size from the height of the terminal.

AccountList: It allows a fast account switching without directly using the credentials

Usage examples: "/tell reco Player2", "/connect Player1"

[Main.Advanced.AccountList] AccountNikename1 = { Login = "playerone@email.com", Password = "thepassword" } AccountNikename2 = { Login = "TestBot", Password = "-" }

ServerList: It allows an easier and faster server switching with short aliases instead of full server IP

Aliases cannot contain dots or spaces, and the name "localhost" cannot be used as an alias.

Usage examples: "/tell connect Server1", "/connect Server2"

[Main.Advanced.ServerList] ServerAlias1 = { Host = "mc.awesomeserver.com" } ServerAlias2 = { Host = "192.168.1.27", Port = 12345 }

Einstellungen im Zusammenhang mit der Chat-Signatur (beeinflusst Minecraft 1.19+).

[Signature] LoginWithSecureProfile = true # Nur Microsoft-Konten zulässig. Wenn diese Option deaktiviert ist, können Benutzer nicht chatten oder Server betreten, die mit "enforce-secure-profile=true" konfiguriert sind. SignChat = true # Ob der Chat, der von MCC gesendet wird, signiert werden soll. SignMessageInCommand = true # Ob die Nachrichten, die in den von MCC gesendeten Befehlen enthalten sind, signiert werden sollen. Zum Beispiel die Nachricht in "/msg" und "/me". MarkLegallySignedMsg = true # Nutze grüne Farbblöcke, um Systemnachrichten zu markieren (immer ohne Signatur) MarkModifiedMsg = true # Nutze gelbe Farbblöcke, um Systemnachrichten zu markieren (immer ohne Signatur) MarkIllegallySignedMsg = true # Nutze rote Farbblöcke, um Systemnachrichten zu markieren (immer ohne Signatur) MarkSystemMessage = true # Nutze graue Farbblöcke, um Systemnachrichten zu markieren (immer ohne Signatur) ShowModifiedChat = true # Setzen Sie "true", um vom Server modifizierte Nachrichten anzuzeigen, "false", um die Original signierten Nachrichten anzuzeigen. ShowIllegalSignedChat = true # Gibt an, ob Chats und Nachrichten in Befehlen ohne legale Signaturen angezeigt werden sollen

This setting affects only the messages in the console.

[Logging] DebugMessages = false # Please enable this before submitting bug reports. Thanks! ChatMessages = true # Show server chat messages. InfoMessages = true # Informative messages. (i.e Most of the message from MCC) WarningMessages = true # Show warning messages. ErrorMessages = true # Show error messages. ChatFilterRegex = "." # Regex for filtering chat message. DebugFilterRegex = "." # Regex for filtering debug message. FilterMode = "disable" # "disable" or "blacklist" OR "whitelist". Blacklist hide message match regex. Whitelist show message match regex. LogToFile = false # Write log messages to file. LogFile = "console-log.txt" # Log file name. PrependTimestamp = false # Prepend timestamp to messages in log file. SaveColorCodes = false # Keep color codes in the saved text.(look like "§b")

[Console] [Console.General] ConsoleColorMode = "vt100_24bit" # Use "disable", "legacy_4bit", "vt100_4bit", "vt100_8bit" or "vt100_24bit". If a garbled code like "←[0m" appears on the terminal, you can try switching to "legacy_4bit" mode, or just disable it. Display_Input = true # You can use "Ctrl+P" to print out the current input and cursor position. History_Input_Records = 32 # Console.General.History_Input_Records

The settings for command completion suggestions.

Custom colors are only available when using "vt100_24bit" color mode.

[Console.CommandSuggestion] Enable = true # Whether to display command suggestions in the console. Enable_Color = true Use_Basic_Arrow = false # Enable this option if the arrows in the command suggestions are not displayed properly in your terminal. Max_Suggestion_Width = 30 Max_Displayed_Suggestions = 6 Text_Color = "#f8fafc" Text_Background_Color = "#64748b" Highlight_Text_Color = "#334155" Highlight_Text_Background_Color = "#fde047" Tooltip_Color = "#7dd3fc" Highlight_Tooltip_Color = "#3b82f6" Arrow_Symbol_Color = "#d1d5db"

[AppVar]

can be used in some other fields as %yourvar%

%username% and %serverip% are reserved variables.

[AppVar.VarStirng] your_var = "your_value" "your var 2" = "your value 2"

Mit einem Server über einem Proxy anstelle einer direkten Verbindung verbinden

Wenn Mojang-Sitzungsdienste in deinem Netzwerk gesperrt sind, setze Enabled_Login=true, um mit einem Proxy anzumelden.

Wenn die Verbindung zum Minecraft-Spielserver von der Firewall gesperrt wird, setze Enabled_Ingame=true, um mit einem Proxy eine Verbindung zum Spielserver herzustellen.

/!\ Stelle sicher, dass die Serverregeln Proxies oder VPN-Dienste erlauben, bevor du enabled=true setzt, sonst kann es Konsequenzen geben!

[Proxy] Enabled_Update = false # Gibt an, ob MCC-Updates über den Proxy heruntergeladen werden sollen. Enabled_Login = false # Gibt an, ob eine Verbindung zum Anmeldeserver über einen Proxy hergestellt werden soll. Enabled_Ingame = false # Gibt an, ob eine Verbindung zum Spielserver über einen Proxy hergestellt werden soll. Server = { Host = "0.0.0.0", Port = 8080 } # Der Proxy-Server muss HTTPS für die Anmeldung zulassen und Nicht-443-Ports für das Spielen ermöglichen. Proxy_Type = "HTTP" # Unterstützte Typen: "HTTP", "SOCKS4", "SOCKS4a", "SOCKS5". Username = "" # Nur für passwortgeschützte Proxies erforderlich. Password = "" # Nur für passwortgeschützte Proxies erforderlich.

Die unten aufgeführten Einstellungen werden an den Server gesendet und beeinflussen nur serverseitige Dinge wie Ihr Skin.

[MCSettings] Enabled = true # Wenn diese Option deaktiviert ist, werden die unten aufgeführten Einstellungen nicht an den Server gesendet. Locale = "en_US" # Verwenden Sie jede in Minecraft implementierte Sprache. RenderDistance = 8 # Wertebereich: [0 - 255]. Difficulty = "peaceful" # Schwierigkeitsgrad in MC 1.7-. "friedlich", "leicht", "normal", "schwierig". ChatMode = "enabled" # Verwende "enabled", "commands" oder "disabled". Ermöglicht es, sich stummzuschalten... ChatColors = true # Ermöglicht das Deaktivieren von Chat-Farben auf Serverseite. MainHand = "left" # Haupt-Hand in MC 1.9+. "links" oder "rechts". [MCSettings.Skin] Cape = true Hat = true Jacket = false Sleeve_Left = false Sleeve_Right = false Pants_Left = false Pants_Right = false

MCC does it best to detect chat messages, but some server have unusual chat formats

When this happens, you'll need to configure chat format below, see https://mccteam.github.io/g/conf/#chat-format-section

[ChatFormat] Builtins = false # MCC support for common message formats. Set "false" to avoid conflicts with custom formats. UserDefined = false # Whether to use the custom regular expressions below for detection. Public = "^<([a-zA-Z0-9]+)> (.+)$" Private = "^([a-zA-Z0-9]+) whispers to you: (.+)$" TeleportRequest = '^([a-zA-Z0-9_]+) has requested (?:to|that you) teleport to (?:you|them).$'

===============================

Minecraft-Konsolen-Client-Bots

===============================

[ChatBot]

Get alerted when specified words are detected in chat

Useful for moderating your server or detecting when someone is talking to you

[ChatBot.Alerts] Enabled = false Beep_Enabled = true # Play a beep sound when a word is detected in addition to highlighting. Trigger_By_Words = false # Triggers an alert after receiving a specified keyword. Trigger_By_Rain = false # Trigger alerts when it rains and when it stops. Trigger_By_Thunderstorm = false # Triggers alerts at the beginning and end of thunderstorms. Log_To_File = false # Loggt Warnungen in eine Datei. Log_File = "alerts-log.txt" # The name of a file where alers logs will be written.

List of words/strings to alert you on.

Matches = [ "Yourname", " whispers ", "-> me", "admin", ".com", ]

List of words/strings to NOT alert you on.

Excludes = [ "myserver.com", "Yourname>:", "Player Yourname", "Yourname joined", "Yourname left", "[Lockette] (Admin)", " Yourname:", "Yourname is", ]

Send a command on a regular or random basis or make the bot walk around randomly to avoid automatic AFK disconnection

/!\ Make sure your server rules do not forbid anti-AFK mechanisms!

/!\ Make sure you keep the bot in an enclosure to prevent it wandering off if you're using terrain handling! (Recommended size 5x5x5)

[ChatBot.AntiAFK] Enabled = false Delay = { min = 60.0, max = 60.0 } # The time interval for execution. (in seconds) Command = "/ping" # Command to send to the server. Use_Sneak = false # Whether to sneak when sending the command. Use_Terrain_Handling = false # Use terrain handling to enable the bot to move around. Walk_Range = 5 # The range the bot can move around randomly (Note: the bigger the range, the slower the bot will be) Walk_Retries = 20 # How many times can the bot fail trying to move before using the command method.

Automatically attack hostile mobs around you

You need to enable Entity Handling to use this bot

/!\ Make sure server rules allow your planned use of AutoAttack

/!\ SERVER PLUGINS may consider AutoAttack to be a CHEAT MOD and TAKE ACTION AGAINST YOUR ACCOUNT so DOUBLE CHECK WITH SERVER RULES!

[ChatBot.AutoAttack] Enabled = false Mode = "single" # "single" or "multi". single target one mob per attack. multi target all mobs in range per attack Priority = "distance" # "health" or "distance". Only needed when using single mode Cooldown_Time = { Custom = false, value = 1.0 } # How long to wait between each attack. Set "Custom = false" to let MCC calculate it. Interaction = "Attack" # Possible values: "Interact", "Attack" (default), "InteractAt" (Interact and Attack). Attack_Range = 4.0 # Capped between 1 to 4 Attack_Hostile = true # Erlaubt das Angreifen auf feindliche Mobs. Attack_Passive = false # Erlaubt das Angreifen auf passive Mobs. List_Mode = "whitelist" # Wether to treat the entities list as a "whitelist" or as a "blacklist". Entites_List = [ "Zombie", "Cow", ] # All entity types can be found here: https://mccteam.github.io/r/entity/#L15

Automatically craft items in your inventory

See https://mccteam.github.io/g/bots/#auto-craft for how to use

You need to enable Inventory Handling to use this bot

You should also enable Terrain and Movements if you need to use a crafting table

[ChatBot.AutoCraft] Enabled = false CraftingTable = { X = 123.0, Y = 65.0, Z = 456.0 } # Location of the crafting table if you intended to use it. Terrain and movements must be enabled. OnFailure = "abort" # What to do on crafting failure, "abort" or "wait".

Recipes.Name: The name can be whatever you like and it is used to represent the recipe.

Recipes.Type: crafting table type: "player" or "table"

Recipes.Result: the resulting item

Recipes.Slots: All slots, counting from left to right, top to bottom. Please fill in "Null" for empty slots.

For the naming of the items, please see: https://mccteam.github.io/r/item/#L12

[[ChatBot.AutoCraft.Recipes]] Name = "Recipe-Name-1" Type = "player" Result = "StoneBricks" Slots = [ "Stone", "Stone", "Stone", "Stone", ]

[[ChatBot.AutoCraft.Recipes]] Name = "Recipe-Name-2" Type = "table" Result = "StoneBricks" Slots = [ "Stone", "Stone", "Null", "Stone", "Stone", "Null", "Null", "Null", "Null", ]

Auto-digging blocks.

You need to enable Terrain Handling to use this bot

You can use "/digbot start" and "/digbot stop" to control the start and stop of AutoDig.

Since MCC does not yet support accurate calculation of the collision volume of blocks, all blocks are considered as complete cubes when obtaining the position of the lookahead.

For the naming of the block, please see https://mccteam.github.io/r/block/#L15

[ChatBot.AutoDig] Enabled = false Mode = "lookat" # "lookat", "fixedpos" or "both". Digging the block being looked at, the block in a fixed position, or the block that needs to be all met.

The position of the blocks when using "fixedpos" or "both" mode.

Locations = [ { x = 123.5, y = 64.0, z = 234.5 }, { x = 124.5, y = 63.0, z = 235.5 }, ] Location_Order = "distance" # "distance" or "index", When using the "fixedpos" mode, the blocks are determined by distance to the player, or by the order in the list. Auto_Start_Delay = 3.0 # How many seconds to wait after entering the game to start digging automatically, set to -1 to disable automatic start. Dig_Timeout = 60.0 # Mining a block for more than "Dig_Timeout" seconds will be considered a timeout. Log_Block_Dig = true # Whether to output logs when digging blocks. List_Type = "whitelist" # Wether to treat the blocks list as a "whitelist" or as a "blacklist". Blocks = [ "Cobblestone", "Stone", ]

Automatically drop items in inventory

You need to enable Inventory Handling to use this bot

See this file for an up-to-date list of item types you can use with this bot: https://mccteam.github.io/r/item/#L12

[ChatBot.AutoDrop] Enabled = false Mode = "include" # "include", "exclude" or "everything". Include: drop item IN the list. Exclude: drop item NOT IN the list Items = [ "Cobblestone", "Dirt", ]

Automatically eat food when your Hunger value is low

You need to enable Inventory Handling to use this bot

[ChatBot.AutoEat] Enabled = false Threshold = 6

Automatically catch fish using a fishing rod

Guide: https://mccteam.github.io/g/bots/#auto-fishing

You can use "/fish" to control the bot manually.

/!\ Make sure server rules allow automated farming before using this bot

[ChatBot.AutoFishing] Enabled = false Antidespawn = false # Keep it as false if you have not changed it before. Mainhand = true # Use the mainhand or the offhand to hold the rod. Auto_Start = true # Whether to start fishing automatically after entering a world. Cast_Delay = 0.4 # How soon to re-cast after successful fishing. Fishing_Delay = 3.0 # How long after entering the game to start fishing (seconds). Fishing_Timeout = 300.0 # Fishing timeout (seconds). Timeout will trigger a re-cast. Durability_Limit = 2.0 # Will not use rods with less durability than this (full durability is 64). Set to zero to disable this feature. Auto_Rod_Switch = true # Switch to a new rod from inventory after the current rod is unavailable. Stationary_Threshold = 0.001 # Hook movement in the X and Z axis less than this value will be considered stationary. Hook_Threshold = 0.2 # A "stationary" hook that moves above this threshold in the Y-axis will be considered to have caught a fish. Log_Fish_Bobber = false # Used to adjust the above two thresholds, which when enabled will print the change in the position of the fishhook entity upon receipt of its movement packet. Enable_Move = false # This allows the player to change position/facing after each fish caught.

It will move in order "1->2->3->4->3->2->1->2->..." and can change position or facing or both each time. It is recommended to change the facing only.

[[ChatBot.AutoFishing.Movements]] facing = { yaw = 12.34, pitch = -23.45 }

[[ChatBot.AutoFishing.Movements]] XYZ = { x = 123.45, y = 64.0, z = -654.32 } facing = { yaw = -25.14, pitch = 36.25 }

[[ChatBot.AutoFishing.Movements]] XYZ = { x = -1245.63, y = 63.5, z = 1.2 }

Automatically relog when disconnected by server, for example because the server is restating

/!\ Use Ignore_Kick_Message=true at own risk! Server staff might not appreciate if you auto-relog on manual kicks

[ChatBot.AutoRelog] Enabled = true Delay = { min = 240.0, max = 500.0 } # The delay time before joining the server. (in seconds) Retries = 3 # Retries when failing to relog to the server. use -1 for unlimited retries. Ignore_Kick_Message = false # When set to true, autorelog will reconnect regardless of kick messages.

If the kickout message matches any of the strings, then autorelog will be triggered.

Kick_Messages = [ "connection has been lost", "server is restarting", "server is full", "too many people", ]

Run commands or send messages automatically when a specified pattern is detected in chat

Server admins can spoof chat messages (/nick, /tellraw) so keep this in mind when implementing AutoRespond rules

/!\ This bot may get spammy depending on your rules, although the global messagecooldown setting can help you avoiding accidental spam

[ChatBot.AutoRespond] Enabled = false Matches_File = "matches.ini" Match_Colors = false # Do not remove colors from text (Note: Your matches will have to include color codes (ones using the § character) in order to work)

Logs chat messages in a file on disk.

[ChatBot.ChatLog] Enabled = false Add_DateTime = true Log_File = "chatlog-%username%-%serverip%.txt" Filter = "messages"

This bot allows you to send and recieve messages and commands via a Discord channel.

For Setup you can either use the documentation or read here (Documentation has images).

Documentation: https://mccteam.github.io/g/bots/#discord-bridge

Setup:

First you need to create a Bot on the Discord Developers Portal, here is a video tutorial: https://www.youtube.com/watch?v=2FgMnZViNPA .

/!\ IMPORTANT /!\: When creating a bot, you MUST ENABLE "Message Content Intent", "Server Members Intent" and "Presence Intent" in order for bot to work! Also follow along carefully do not miss any steps!

When making a bot, copy the generated token and paste it here in "Token" field (tokens are important, keep them safe).

Copy the "Application ID" and go to: https://discordapi.com/permissions.html .

Paste the id you have copied and check the "Administrator" field in permissions, then click on the link at the bottom.

This will open an invitation menu with your servers, choose the server you want to invite the bot on and invite him.

Once you've invited the bot, go to your Discord client and go to Settings -> Advanced and Enable "Developer Mode".

Exit the settings and right click on a server you have invited the bot to in the server list, then click "Copy ID", and paste the id here in "GuildId".

Then right click on a channel where you want to interact with the bot and again right click -> "Copy ID", pase the copied id here in "ChannelId".

And for the end, send a message in the channel, right click on your nick and again right click -> "Copy ID", then paste the id here in "OwnersIds".

How to use:

To execute an MCC command, prefix it with a dot ".", example: ".move 143 64 735" .

To send a message, simply type it out and hit enter.

[ChatBot.DiscordBridge] Enabled = false Token = "your bot token here" # Dein Discord-Bot-Token. GuildId = 1018553894831403028 # The ID of a server/guild where you have invited the bot to. ChannelId = 1018565295654326364 # The ID of a channel where you want to interact with the MCC using the bot. OwnersIds = [ 978757810781323276, ] # A list of IDs of people you want to be able to interact with the MCC using the bot. Message_Send_Timeout = 3 # How long to wait (in seconds) if a message can not be sent to discord before canceling the task (minimum 1 second).

Message formats

Words wrapped with { and } are going to be replaced during the code execution, do not change them!

For example. {message} is going to be replace with an actual message, {username} will be replaced with an username, {timestamp} with the current time.

For Discord message formatting, check the following: https://mccteam.github.io/r/dc-fmt.html

PrivateMessageFormat = "[Private Message] {username}: {message}" PublicMessageFormat = "{username}: {message}" TeleportRequestMessageFormat = "A new Teleport Request from {username}!"

Automatically farms crops for you (plants, breaks and bonemeals them).

Crop types available: Beetroot, Carrot, Melon, Netherwart, Pumpkin, Potato, Wheat.

Usage: "/farmer start" command and "/farmer stop" command.

NOTE: This a newly added bot, it is not perfect and was only tested in 1.19.2, there are some minor issues like not being able to bonemeal carrots/potatoes sometimes.

or bot jumps onto the farm land and breaks it (this happens rarely but still happens). We are looking forward at improving this.

It is recommended to keep the farming area walled off and flat to avoid the bot jumping.

Also, if you have your farmland that is one block high, make it 2 or more blocks high so the bot does not fall through, as it can happen sometimes when the bot reconnects.

The bot also does not pickup all items if they fly off to the side, we have a plan to implement this option in the future as well as drop off and bonemeal refill chest(s).

[ChatBot.Farmer] Enabled = false Delay_Between_Tasks = 1.0 # Delay between tasks in seconds (Minimum 1 second)

Enabled you to make the bot follow you

NOTE: This is an experimental feature, the bot can be slow at times, you need to walk with a normal speed and to sometimes stop for it to be able to keep up with you

It's similar to making animals follow you when you're holding food in your hand.

This is due to a slow pathfinding algorithm, we're working on getting a better one

You can tweak the update limit and find what works best for you. (NOTE: Do not but a very low one, because you might achieve the opposite,

this might clog the thread for terain handling) and thus slow the bot even more.

/!\ Make sure server rules allow an option like this in the rules of the server before using this bot

[ChatBot.FollowPlayer] Enabled = false Update_Limit = 1.5 # The rate at which the bot does calculations (in seconds) (You can tweak this if you feel the bot is too slow) Stop_At_Distance = 3.0 # Do not follow the player if he is in the range of 3 blocks (prevents the bot from pushing a player in an infinite loop)

A small game to demonstrate chat interactions. Players can guess mystery words one letter at a time.

You need to have ChatFormat working correctly and add yourself in botowners to start the game with /tell start

/!\ This bot may get a bit spammy if many players are interacting with it

[ChatBot.HangmanGame] Enabled = false English = true FileWords_EN = "hangman-en.txt" FileWords_FR = "hangman-fr.txt"

Relay messages between players and servers, like a mail plugin

This bot can store messages when the recipients are offline, and send them when they join the server

/!\ Server admins can spoof PMs (/tellraw, /nick) so enable this bot only if you trust server admins

[ChatBot.Mailer] Enabled = false DatabaseFile = "MailerDatabase.ini" IgnoreListFile = "MailerIgnoreList.ini" PublicInteractions = false MaxMailsPerPlayer = 10 MaxDatabaseSize = 10000 MailRetentionDays = 30

Allows you to render maps in the console and into images (which can be then sent to Discord using Discord Bridge Chat Bot)

This is useful for solving captchas which use maps

The maps are rendered into Rendered_Maps folder if the Save_To_File is enabled.

NOTE:

If some servers have a very short time for solving captchas, enabe Auto_Render_On_Update to see them immediatelly in the console.

/!\ Make sure server rules allow bots to be used on the server, or you risk being punished.

[ChatBot.Map] Enabled = false Render_In_Console = true # Whether to render the map in the console. Save_To_File = false # Whether to store the rendered map as a file (You need this setting if you want to get a map on Discord using Discord Bridge). Auto_Render_On_Update = false # Automatically render the map once it is received or updated from/by the server Delete_All_On_Unload = true # Delete all rendered maps on unload/reload or when you launch the MCC again. Notify_On_First_Update = true # Get a notification when you have gotten a map from the server for the first time Rasize_Rendered_Image = false # Resize an rendered image, this is useful when images that are rendered are small and when are being sent to Discord. Resize_To = 512 # The size that a rendered image should be resized to, in pixels (eg. 512).

Send a rendered map (saved to a file) to a Discord or a Telegram channel via the Discord or Telegram Bride chat bot (The Discord/Telegram Bridge chat bot must be enabled and configured!)

You need to enable Save_To_File in order for this to work.

We also recommend turning on resizing.

Send_Rendered_To_Discord = false Send_Rendered_To_Telegram = false

Log the list of players periodically into a textual file.

[ChatBot.PlayerListLogger] Enabled = false File = "playerlog.txt" Delay = 60.0 # (In Sekunden)

Send MCC console commands to your bot through server PMs (/tell)

You need to have ChatFormat working correctly and add yourself in botowners to use the bot

/!\ Server admins can spoof PMs (/tellraw, /nick) so enable RemoteControl only if you trust server admins

[ChatBot.RemoteControl] Enabled = true AutoTpaccept = true AutoTpaccept_Everyone = false

Enable recording of the game (/replay start) and replay it later using the Replay Mod (https://www.replaymod.com/)

Please note that due to technical limitations, the client player (you) will not be shown in the replay file

/!\ You SHOULD use /replay stop or exit the program gracefully with /quit OR THE REPLAY FILE MAY GET CORRUPT!

[ChatBot.ReplayCapture] Enabled = false Backup_Interval = 300.0 # How long should replay file be auto-saved, in seconds. Use -1 to disable.

Schedule commands and scripts to launch on various events such as server join, date/time or time interval

See https://mccteam.github.io/g/bots/#script-scheduler for more info

[ChatBot.ScriptScheduler] Enabled = true

[[ChatBot.ScriptScheduler.TaskList]] Task_Name = "Automassage" Trigger_On_First_Login = false Trigger_On_Login = true Trigger_On_Times = { Enable = false, Times = [ 14:00:00, ] } Trigger_On_Interval = { Enable = false, MinTime = 1.0, MaxTime = 1.0 } Action = "script rmhjohennes.txt"

[[ChatBot.ScriptScheduler.TaskList]] Task_Name = "rmhjohennes" Trigger_On_First_Login = false Trigger_On_Login = false Trigger_On_Times = { Enable = false, Times = [ ] } Trigger_On_Interval = { Enable = false, MinTime = 1.0, MaxTime = 10.0 } Action = ""

This bot allows you to send and receive messages and commands via a Telegram Bot DM or to receive messages in a Telegram channel.

/!\ NOTE: You can't send messages and commands from a group channel, you can only send them in the bot DM, but you can get the messages from the client in a group channel.

-----------------------------------------------------------

Setup:

First you need to create a Telegram bot and obtain an API key, to do so, go to Telegram and find @botfather

Click on "Start" button and read the bot reply, then type "/newbot", the Botfather will guide you through the bot creation.

Once you create the bot, copy the API key that you have gotten, and put it into the "Token" field of "ChatBot.TelegramBridge" section (this section).

/!\ Do not share this token with anyone else as it will give them the control over your bot. Save it securely.

Then launch the client and go to Telegram, find your newly created bot by searching for it with its username, and open a DM with it.

Click on "Start" button and type and send the following command ".chatid" to obtain the chat id.

Copy the chat id number (eg. 2627844670) and paste it in the "ChannelId" field and add it to the "Authorized_Chat_Ids" field (in this section) (an id in "Authorized_Chat_Ids" field is a number/long, not a string!), then save the file.

Now you can use the bot using it's DM.

/!\ If you do not add the id of your chat DM with the bot to the "Authorized_Chat_Ids" field, ayone who finds your bot via search will be able to execute commands and send messages!

/!\ An id pasted in to the "Authorized_Chat_Ids" should be a number/long, not a string!

-----------------------------------------------------------

NOTE: If you want to recieve messages to a group channel instead, make the channel temporarely public, invite the bot to it and make it an administrator, then set the channel to private if you want.

Then set the "ChannelId" field to the @ of your channel (you must include the @ in the settings, eg. "@mysupersecretchannel"), this is the username you can see in the invite link of the channel.

/!\ Only include the username with @ prefix, do not include the rest of the link. Example if you have "https://t.me/mysupersecretchannel", the "ChannelId" will be "@mysupersecretchannel".

/!\ Note that you will not be able to send messages to the client from a group channel!

-----------------------------------------------------------

How to use the bot:

To execute an MCC command, prefix it with a dot ".", example: ".move 143 64 735" .

To send a message, simply type it out and hit enter.

[ChatBot.TelegramBridge] Enabled = false Token = "your bot token here" # Dein Telegram-Bot-Token. ChannelId = "" # An ID of a channel where you want to interact with the MCC using the bot. Authorized_Chat_Ids = [ ] # A list of Chat IDs that are allowed to send messages and execute commands. To get an id of your chat DM with the bot use ".chatid" bot command in Telegram. Message_Send_Timeout = 3 # How long to wait (in seconds) if a message can not be sent to Telegram before canceling the task (minimum 1 second).

Message formats

Words wrapped with { and } are going to be replaced during the code execution, do not change them!

For example. {message} is going to be replace with an actual message, {username} will be replaced with an username, {timestamp} with the current time.

For Telegram message formatting, check the following: https://mccteam.github.io/r/tg-fmt.html

PrivateMessageFormat = "(Private Message) {username}: {message}" PublicMessageFormat = "{username}: {message}" TeleportRequestMessageFormat = "A new Teleport Request from {username}!"

  1. image thank you man

milutinke commented 1 year ago

Yeah, as I have suspected, the chat format is not vanilla, you will have to go to [ChatFormat] section. Set Builtins to false and UserDefined to true, then write the regex for Public, Private and TeleportRequest. As for making regex, I suggest watching the tutorials linked here: https://mccteam.github.io/guide/configuration.html#chat-format-section

You also can ask Chat GPT to help you, just give it a copy of a private message you've received.

breadbyte commented 1 year ago

In your [ChatFormat] section, change it to the following:

[ChatFormat]
Builtins = false
UserDefined = true
Public = "^.* (.*): (.*)$"
Private = "^.* \[Du -> (.*)\] (.*)$"
TeleportRequest = '^([a-zA-Z0-9_]+) has requested (?:to|that you) teleport to (?:you|them).$'

I don't know what your TeleportRequest looks like in the server, so I have not changed it from the default.

Johannes099 commented 1 year ago

So I can use it if I copy paste your thing in it?

Johannes099 commented 1 year ago

Cause idk how to use the regex tutorial here

Johannes099 commented 1 year ago

so now i copy pasted it and i have this error:

image
Johannes099 commented 1 year ago

if i remove the \ than it doesnt work atr all :(

breadbyte commented 1 year ago

I made a mistake, change your chat format to the following:

[ChatFormat]
Builtins = false
UserDefined = true
Public = "^.* (.*): (.*)$"
Private = "^.* \\[Du -> (.*)\\] (.*)$"
TeleportRequest = '^([a-zA-Z0-9_]+) has requested (?:to|that you) teleport to (?:you|them).$'
Johannes099 commented 1 year ago

Thanks I'm trying this now do u have discord?

Johannes099 commented 1 year ago

still dont work image

milutinke commented 1 year ago

still dont work image

Can you disable that texture and screenshot it again, as well copy a message and paste it here. Maybe the letters before the [ are messing up with the regex

Johannes099 commented 1 year ago

] is Just thenway the Server Display the /MSG Stephan117 and the Texturenpack is Server Default

Johannes099 commented 1 year ago

/msg Stephan117 quit image thanx

Johannes099 commented 1 year ago

and how can i do that if the bot enters the server, it presses the esc button?

breadbyte commented 1 year ago

can you show what the PM message looks like in MCC?

Johannes099 commented 1 year ago

The same

breadbyte commented 1 year ago

we need a picture of mcc, because that's what we need to match to, not the minecraft message

Johannes099 commented 1 year ago

Oke i'll make one ASA

breadbyte commented 1 year ago

If you have discord, you can join the discord server and create a help thread there so we can work faster instead of having to discuss it here on github.

Johannes099 commented 1 year ago

yea thx how to come on the discord?

breadbyte commented 1 year ago

https://discord.gg/sfBv4TtpC9