

Enables two-way communication between your Valheim server and Discord channels.
client and serverBot to the Application
Message Content IntentBot Token
botWebhooks allow the plugin to send messages to Discord channels without using the bot's identity.
Create Webhook
Copy Webhook URL
You'll need Discord Channel IDs for the bot to read messages:
Enable Developer Mode
Copy Channel IDs
After first run, configuration files will be generated in BepInEx/config/. Edit the Discord Bot config file to set up your:
Find DiscordBot plugin configurations in BepinEx/config/RustyMods.DiscordBot.cfg
Here's what your configuration might look like:
[1 - General]
## If on, the configuration is locked and can be changed by server admins only. [Synced with Server]
Lock Configuration = On
## Set interval between check for messages in discord, in seconds [Synced with Server]
Poll Interval = 5
## If on, errors will log to console as warnings [Synced with Server]
Log Errors = Off
[2 - Notifications]
## Set webhook to receive notifications, like server start, stop, save etc... [Synced with Server]
Webhook URL = https://discord.com/api/webhooks/1405043541192741007/X-WuWkr_0ApZ4JHq7_TOeMHfRCErXgUZkVnE_oh_yfy2mWKRShHK-wDzdasdWWDzdjk
## If on, bot will send message when server is starting [Synced with Server]
Startup = Off
## If on, bot will send message when server is shutting down [Synced with Server]
Shutdown = Off
## If on, bot will send message when server is saving [Synced with Server]
Saving = Off
## If on, bot will send message when player dies [Synced with Server]
On Death = On
## If on, bot will send message when new player connects [Synced with Server]
New Connection = Off
[3 - Chat]
## Set discord webhook to display chat messages [Synced with Server]
Webhook URL = https://discord.com/api/webhooks/1404119063046652035/OqBFopk29Cku3_4TiLCJVwaagkyLVsdlkjasd239-sdjzdHH7vHh_RfWy1d3
## Set channel ID to monitor for messages [Synced with Server]
Channel ID = 9839768234583209
## If on, bot will send message when player shouts and monitor discord for messages [Synced with Server]
Enabled = On
[4 - Commands]
## Set discord webhook to display feedback messages from commands [Synced with Server]
Webhook URL = https://discord.com/api/webhooks/1404941903144685779/gc8DFwfIO5eUnxzoJ1Dqsi-iX68GLUMWz_3sdlkjasd9DDAS7tKfB1qWuYN
## Set channel ID to monitor for input commands [Synced with Server]
Channel ID = 1106947857194165898
## List of discord admins, who can run commands [Synced with Server]
Discord Admin = .rusty,.warp
[5 - Setup]
## Add bot token here, server only
BOT TOKEN =
shout in the in-game chat will appear in your configured Discord chat channelSend commands in your designated command channel:
!!listplayers to list online players!save to save the worldLegend:
- <string:Parameter> - Text parameter
- <int:Parameter> - Number parameter
- <float:Parameter> - Decimal number parameter
- <parameter?> - Optional parameter
- [Admin Only] - Command restricted to registered Discord admins
helpDescription: List of all available commands
Usage: !help
listadmins [Admin Only]Description: List of discord admins registered to plugin
Usage: !listadmins
listplayers [Admin Only]Description: List of active players with their positions
Usage: !listplayers
kick [Admin Only]Description: Kicks player from server
Usage: !kick <string:PlayerName>
give [Admin Only]Description: Adds item directly into player inventory
Usage: !give <string:PlayerName> <string:ItemName> <int:Stack> <int?:Quality> <int?:Variant>
Example: !give PlayerName IronSword 1 3 0
pos [Admin Only]Description: Get player's current position coordinates
Usage: !pos <string:PlayerName>
die [Admin Only]Description: Kills specified player
Usage: !die <string:PlayerName>
teleport [Admin Only]Description: Teleport player to location, bed, or another player
Usage:
teleport <string:PlayerName> bed - Teleport to bedteleport <string:PlayerName> <string:OtherPlayerName> - Teleport to another playerteleport <string:PlayerName> <float:x> <float:y> <float:z> - Teleport to coordinatesteleportall [Admin Only]Description: Teleports all players to specified coordinates
Usage: !teleportall <float:x> <float:y> <float:z>
listenvDescription: List of available environments
Usage: !listenv
env [Admin Only]Description: Force environment on all players
Usage: !env <string:EnvironmentName>
Example: !env Twilight_Clear
resetenv [Admin Only]Description: Reset environment on all players to default
Usage: !resetenv
spawn [Admin Only]Description: Spawns prefab at location
Usage:
!spawn <string:PrefabName> <int:Level> <string:PlayerName> - Spawn at player location!spawn <string:PrefabName> <int:Level> <float:x> <float:y> <float:z> - Spawn at coordinates!spawn Troll 3 PlayerNamelistevents [Admin Only]Description: List of available event names
Usage: !listevents
event [Admin Only]Description: Starts an event on a player
Usage: !event <string:EventName> <string:PlayerName>
Example: !event Wolves PlayerName
liststatusDescription: List of available status effects
Usage: !liststatus
addstatus [Admin Only]Description: Add status effect to player
Usage: !addstatus <string:PlayerName> <string:StatusEffect> <float:Duration>
Example: !addstatus PlayerName Rested 300
listskillsDescription: List of available skills
Usage: !listskills
raiseskill [Admin Only]Description: Raises player's skill level
Usage: !raiseskill <string:PlayerName> <string:SkillType> <float:Amount>
Example: !raiseskill PlayerName Swords 10
save [Admin Only]Description: Save player profiles and world
Usage: !save
message [Admin Only]Description: Broadcast message to all players (appears center screen)
Usage: !message <message text>
Example: !message Server restart in 5 minutes!
setkey [Admin Only]Description: Set global key (affects world state)
Usage: !setkey <string:GlobalKeyName>
Example: !setkey defeated_bonemass
addadmin [Admin Only]Description: Adds discord username to admin list
Usage: !addadmin <string:Username>
removeadmin [Admin Only]Description: Remove discord username from admin list
Usage: !removeadmin <string:Username>
The plugin supports multiple AI providers for enhanced chat interactions and death quips. Each client configures their own API keys, ensuring token usage and costs remain separate.
Multiple Providers: Choose from 4 different AI services
Free Tier Options:
Paid Services:
Haven't fully tested longevity of this feature, but can be a fun gimmick for a little while
[8 - AI]
## Set which Artificial Intelligence API to use [Not Synced with Server]
# Setting type: AIService
# Default value: Gemini
# Acceptable values: ChatGPT, Gemini, DeepSeek, OpenRouter
Provider = Gemini
## Set ChatGPT key [Not Synced with Server]
# Setting type: String
# Default value:
ChatGPT =
## Set Gemini key [Not Synced with Server]
# Setting type: String
# Default value:
Gemini =
## Set DeepSeek key [Not Synced with Server]
# Setting type: String
# Default value:
DeepSeek =
## Set OpenRouter key [Not Synced with Server]
# Setting type: String
# Default value:
OpenRouter =
## Set OpenRouter Model [Not Synced with Server]
# Setting type: OpenRouterModel
# Default value: Claude3_5Sonnet
# Acceptable values: Claude3_5Sonnet, GeminiFlashFree, Llama31_8B, Llama31_70B, WizardLM8x22B, GPT4oMini, DeepSeekChat
OpenRouter Model = Claude3_5Sonnet
Job allows to invoke discord commands on a set interval, beginning whenever the server starts.
Format:
command: !shout
interval: 1000.0
args: This is a reoccurring shout message from the server every 16 minutes
Example:
command: !listplayers
interval: 1800
command: !save
interval: 3600
pos command)