diff --git a/docker-compose.yml b/docker-compose.yml index 471d2a9..94bfa2d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,6 +64,7 @@ services: - ./mc/mods:/mods:ro - ./mc/icon.png:/icon.png - ./mc/whitelist.json:/whitelist.json + - ./mc/mc2discord.toml:/data/config/mc2discord.toml depends_on: - lazytainer network_mode: service:lazytainer diff --git a/mc/mc2discord.toml b/mc/mc2discord.toml new file mode 100644 index 0000000..6c60627 --- /dev/null +++ b/mc/mc2discord.toml @@ -0,0 +1,191 @@ +# Set language for this configuration file. Delete the rest of the file to update. Thanks to the translators: Morty#0273 (ru_ru), PixelVoxel#4327 (ko_kr), thearchy.helios (zh_cn) +# Supported languages: en_us, fr_fr, ru_ru, ko_kr, zh_cn +lang = "en_us" + +# Mc2Discord configuration file +# - Curseforge (Download): https://www.curseforge.com/minecraft/mc-mods/mc2discord +# - Modrinth (Download): https://modrinth.com/mod/mc2discord +# - Discord (Support): https://discord.gg/rzzd76c +# - Github (Source code): https://github.com/DenisD3D/Mc2Discord +# - Wiki (Configuration guide): https://github.com/DenisD3D/Mc2Discord/wiki +# +# +# FOLLOW THE CONFIGURATION GUIDE IN THE WIKI: https://github.com/DenisD3D/Mc2Discord/wiki +# +# +# Support is available through the Discord server +[General] + # Token for the Discord bot account, equivalent to a password obtainable through the Discord website (see: https://github.com/DenisD3D/Mc2Discord/wiki/Discord-token) + token = "" + +# Channels configuration +# One [[Channels.Channel]] block should be created per Discord channel you want to setup +[Channels] + + [[Channels.Channel]] + # Id of the Discord channel to send messages in (see: https://github.com/DenisD3D/Mc2Discord/wiki/Discord-ids) + id = 1239599547575963720 + # List of messages types to send that will be sent in this channel. Available values: "info", "chat", "command", "logs" + subscriptions = ["info", "chat", "command"] + # Messages format in this channel. Available values: WEBHOOK, PLAIN_TEXT, EMBED + mode = "WEBHOOK" + +# Messages content configuration +# Variables (${xxx}) are replaced by corresponding values (see complete list of variables: https://github.com/DenisD3D/Mc2Discord/wiki/Variables) +# "global" variables may be used in any field +[Messages] + # When server start + start = "The server has started" + # When server stop + stop = "The server has stopped" + # When a player join the server ("player" variables are available) + join = "${player_display_name} joined the game" + # When a player join the server ("player" variables are available) + leave = "${player_display_name} left the game" + # When a player die ("player" and "death" variables are available) + death = "${death_message}" + # When a player unlock an advancement ("player" and "advancement" variables are available) + advancement = "${player_display_name} has made the advancement ${advancement_title}. ${advancement_description}." + +# Commands configuration +[Commands] + # Prefix before each command. Minecraft default one is '/' (eg : /help) + prefix = "!" + # If true, commands result are sent in a code block (```result```) + use_codeblocks = true + + # Commands permissions configuration. + # One [[Commands.Permission]] block should be created per Discord channel you want to setup + [[Commands.Permission]] + # Id of the Discord member or Discord role the permission apply to (0 <=> everyone) + id = 0 + # Minecraft permission level that will be allowed, all commands up to that level will be available (-1 <=> No commands, 0 <=> all non-op commands, 3 <=> all op commands) + permission_level = -1 + # List of commands that will be allowed in addition of the permission level + commands = ["time set", "weather clear"] + +# Enable additional features +# Executing "/mc2discord restart" is required to generate feature-related parts of the configuration file +[Features] + # Regular channels name and topic updates with global variables + status_channels = true + # Minecraft and Discord accounts linking with optional whitelist + account_linking = true + +# Status channels configuration +# One [[StatusChannels.Channel]] block should be created per Discord channel you want to setup +[StatusChannels] + + [[StatusChannels.Channel]] + # Id of the Discord channel of which to edit name and topic (see: https://github.com/DenisD3D/Mc2Discord/wiki/Discord-ids) + id = 0 + # Value to set as name of the channel ("global" variables are available, whitespace are replaced by '-' in text channels) + name_message = "${online_players} / ${max_players}" + # Value set as description of the channel ("global" variables are available) + topic_message = "${online_players} / ${max_players}" + # Delay between to update of the channel (in seconds, any value below 610 may cause issues) + update_period = 610 + +# Account linking configuration +[Account] + # Id of the guild (Discord server) + guild_id = 1239594359809245275 + # If true, Discord members will be renamed to discord_pseudo_format + rename_discord_member = true + # Format to rename Discord members in ("player", "member" and "global" variables are available) + discord_pseudo_format = "${member_name} (IG: ${player_name})" + # If true, players will be asked to link their account before joining the server (whitelist) + force_link = true + + # Content of messages related to account linking + # "global" variables may be used in any field + [Account.Messages] + # When a player receive a link code ("${command}" and minecraft formatting variables are available) + link_get_code = "To link your account please send ${command} to ${bot_name}#${bot_discriminator} in a private message on Discord" + # When a player has successfully linked + link_successful = "You have successfully linked your account" + # When a player sent an invalid code + link_invalid_code = "This code is invalid" + # When a player is already linked + link_error_already = "Your account is already linked" + # When a player has successfully unlinked + unlink_successful = "Your account is now unlinked" + # When unlinking failed + unlink_error = "Can't unlink your account" + # When a player doesn't have required roles to link his account + missing_roles = "You don't have the required roles to link your account" + + # Account linking requirements configuration + # One [[Account.Policy]] block should be created per account linking requirements + [[Account.Policy]] + # List of Discord roles id that are required to link an account (a member must have all these roles to be able to link his account) + required_roles_id = [1239617611730387014] + # List of Discord roles id that will be given to a member when he link his account + roles_id_to_give = [1239618440226934878] + +# Style configuration +[Style] + # Override the bot name in webhook and embed mode ("global" variables are available) + bot_name = "" + # Override the bot avatar in webhook and embed mode, must be a valid URL to an image ("global" variables are available) + bot_avatar = "" + # Set the format of the player name appearing next to chat message when using webhook mode ("player" and "global" variables are available) + webhook_display_name = "${player_display_name}" + # URL used to get players head, must be a valid URL to an image ("player" and "global" variables are available) + webhook_avatar_api = "https://mc-heads.net/head/${player_uuid}/right" + # Format used for messages sent in minecraft chat. ("${reply}", "${attachements}", "member", "message", "global" and minecraft formatting variables are available) + minecraft_chat_format = "<${color_start|#FF0000}Discord${color_end} - ${color_start|top_role}${member_display_name}${color_end}> ${bold_start}${reply}${message}${bold_end}" + # Replace ${reply} in minecraft_chat_format if the message has a referenced message. ("member" (author of the referenced message) and "global" variables are available). + reply_format = "Replying to ${member_nickname}: " + # Format used for chat messages in PLAIN_TEXT mode ("player", "message" and "global" variables are available) + discord_chat_format = "**${player_display_name}**: ${message}" + # If true, bot avatar will be shown in the embed for info messages + embed_show_bot_avatar = true + + # Embed colors. A color from https://github.com/DenisD3D/Mc2Discord/wiki/Embed-Colors or a decimal color + [Style.EmbedColors] + info = "SUMMER_SKY" + chat = "MEDIUM_SEA_GREEN" + command = "MEDIUM_SEA_GREEN" + log = "SUMMER_SKY" + + # Presence configuration + [Style.Presence] + # Message to display under the bot in the member list on Discord ("global" variables are available) + message = "${online_players} / ${max_players} players" + # The type of presence (PLAYING, STREAMING, LISTENING, WATCHING, COMPETING or CUSTOM) + type = "PLAYING" + # Delay between to update of the channel (in seconds, any value below 610 may cause issues) + update = 60 + # Only if type is STREAMING, ignored for others type, must be a valid youtube or twitch link. + link = "" + +# Miscellaneous settings +[Misc] + # If true, other bots messages will be sent in minecraft chat + relay_bot_messages = false + # List of allowed mentions from minecraft (supported value: "EVERYONE_AND_HERE", "ROLE", "USER") + allowed_mention = ["ROLE", "USER"] + # Text of the /discord command + discord_text = "Invitation link not set" + # Link of the /discord command + discord_link = "https://discord.gg/" + # Format for server logs on Discord + logs_format = "[${log_time|HH:mm:ss}] [${log_thread_name}/${log_level}] [${log_logger_name}]: ${log_message}" + # Level for server logs on Discord (supported values: FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL) + logs_level = "INFO" + # List of commands to broadcast to Discord. If absent message will only be sent to Minecraft (supported values: say, me, tellraw) + broadcast_commands = ["say", "me", "tellraw"] + # If true, any message sent by another mod will be logged to the console (used only for configuration of [[Misc.OtherModMessage]], must be disabled after) + verbose_other_mods_messages = false + + # Configuration for messages from others mods + # Values may be found on the wiki (https://github.com/DenisD3D/Mc2Discord/wiki/Other-Mods-Messages) or by enabling verbose_other_mods_messages + [[Misc.other_mods_messages]] + # Name of the Java class the message is comming from + class_name = "" + # Index of the class in the stacktrace + class_index = 0 + # Type the message will be sent as, must be one found in a Channels.Channel configuration + type = "info" + diff --git a/mc/mods/mc2discord-forge-1.20.1-4.2.3.jar b/mc/mods/mc2discord-forge-1.20.1-4.2.3.jar new file mode 100644 index 0000000..4bd5a49 Binary files /dev/null and b/mc/mods/mc2discord-forge-1.20.1-4.2.3.jar differ diff --git a/mc/whitelist.json b/mc/whitelist.json index 2ebeef1..0637a08 100644 --- a/mc/whitelist.json +++ b/mc/whitelist.json @@ -1,26 +1 @@ -[ - { - "uuid": "c8491b89-6bd9-48b9-9fcc-8c78d8025984", - "name": "Klagarge" - }, - { - "uuid": "d4945f1b-90de-4296-8f83-c4c7088d654a", - "name": "Robibobo1" - }, - { - "uuid": "a62e3fc2-24bb-456d-a733-21c2415f4ceb", - "name": "Terrazed" - }, - { - "uuid": "57b19806-04dc-4faf-8e0f-547ef953df0d", - "name": "LordBaryhobal" - }, - { - "uuid": "76281784-b877-4969-8eca-a35e428e8cea", - "name": "Ranium21" - }, - { - "uuid": "3e828bde-20b5-4956-84d4-6b87c1132298", - "name": "Ranium" - } -] \ No newline at end of file +[] \ No newline at end of file