👾 Discord Integration

Bring the excitement of the casino to your Discord community! Tyche includes a built-in Webhook system that broadcasts high-stakes wins directly to a channel of your choice.

1. Creating a Discord Webhook

To get started, you need to generate a Webhook URL from your Discord server.

  1. Open your Discord Server Settings.

  2. Navigate to Integrations > Webhooks.

  3. Click New Webhook.

  4. Choose the Channel where you want the "Big Wins" to be announced.

  5. Click Copy Webhook URL.


2. Configuration Options

Open your config.yml and locate the discord: section. This is where you connect the plugin to your channel.

YAML

discord:
  # Toggle the integration on or off
  enabled: true

  # Paste the URL you copied from Discord here
  webhook_url: "https://discord.com/api/webhooks/..."

  # Only broadcast wins where the item amount is higher than this
  # Set to 0 to broadcast every single win
  min_bet_amount: 10

  # The name and icon that appears in Discord
  username: "Tyche Casino"
  avatar_url: "https://minotar.net/helm/Gold_Block/64.png"

3. Customizing the Embed

You can fully customize how the announcement looks to match your server's branding.

Setting

Description

title

The bold header at the top of the message.

color

The side-bar color of the embed (in Decimal format).

description

The main body text. Supports Multi-line (`

footer_text

Small text at the very bottom of the embed.

thumbnail_url

The small image in the top right (Default: Winner's skin).

Supported Placeholders

You can use these variables anywhere in the embed section:

  • %winner%: Name of the player who won.

  • %loser%: Name of the player who lost.

  • %item%: The name of the item wagered.

  • %amount%: The quantity of the item.

  • %side%: The side that won (Heads/Tails).


4. Decimal Colors

Discord embeds use Decimal color codes, not Hex.

  • Purple: 10181046

  • Gold: 16761035

  • Red: 15158588

Pro Tip: Use a Hex to Decimal converterarrow-up-right if you have a specific brand color you want to use.


❌ Troubleshooting

"Why aren't my wins showing up in Discord?"

  • Check the Minimum Bet: If your min_bet_amount is set to 64, and a player only flips 32 diamonds, the webhook will not trigger.

  • Invalid Webhook URL: Ensure the URL in your config is exactly what Discord provided.

  • Internet Connection: Since you are home-hosting on your Mini PC, ensure your firewall allows outgoing HTTPS requests to Discord's API.

Last updated