跳到正文

Better With Discord

https://github.com/SajmonOriginal/better-with-discord

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Links the chat of a Better Than Adventure server with a Discord channel.

Players talk to Discord from the game and Discord talks back. Show the item in your hand or your whole inventory with [item] and [inv], and they appear on Discord drawn just like in the game. Images sent on Discord can be held in game as a map.

Server only. Players don’t need to install anything.

An item shown in game chat

The same item on Discord

[item] in the game and the picture it sends to Discord.

Chat

  • Messages go both ways, with each player’s name and head on Discord
  • Joins, leaves, deaths, skipped nights and server start and stop are announced
  • Bold, italics, underline, strikethrough and spoilers work in both directions
  • Replies, attachments and stickers from Discord show up in the game
  • @name in the game mentions that person on Discord. @everyone and @here never ping

Formatted message on Discord The same message in game

Formatting from Discord in the game. Spoilers stay hidden as scrambled text.

Join, leave, death and night messages on Discord

Items and inventories

Write [item] or [i] in chat to show the item in your hand, and [inv] or [inventory] to show your inventory. The pictures use the game’s own textures, font and tooltip style, and also cover items from other mods.

Inventory on Discord Inventory with a worn backpack on Discord

Inventories with Aether accessory slots, the offhand slot and a worn backpack.

  • Your skin and armor on the player model
  • Backpacks from Better With Bags show their contents, and a worn backpack shows on your back and under the inventory
  • Aether accessory slots, gloves, pendants and capes
  • The offhand slot from Better With Hands
  • Maps are drawn under their tooltip

Large Leather Backpack with its contents Reinforced Traveler's Pack with its contents

Map under its tooltip

Backpack contents and a map, drawn inside the tooltip.

Images from Discord

When someone posts an image on Discord, the game shows it as [image.png] /preview 3. Type the command to hold the image as a map. GIFs play. Switching slots puts your item back.

Image posted on Discord

The image held as a map in game

An image from Discord held as a map after /preview.

Commands

| Command | Where | Description |
|———|——-|————-|
| /preview [number] | game | Hold an image from Discord as a map, the last one if no number is given |
| /playerlist | Discord | Picture of who is online, like the tab list |

Player list picture on Discord

/playerlist on Discord, drawn like the tab list.

Console

The server console can be mirrored to a second Discord channel. Messages sent there run as commands. Commands can be limited with a blacklist or a list of allowed commands, and every command from Discord is written to logs/better_with_discord-commands.log.

Setup

  1. Create an application in the Discord Developer Portal and add a bot
  2. Turn on Message Content Intent in the Bot tab
  3. Invite the bot with the bot and applications.commands scopes and these permissions: View Channels, Send Messages, Manage Webhooks, Embed Links, Attach Files
  4. Start the server once, then fill in config/better_with_discord.cfg
  5. Restart the server

All settings are listed in the README on GitHub.

Requirements

License

See LICENSE. Short version: free for personal use and free modpacks with attribution, no commercial use without permission.

评论

登录后评论和评分

SajmonOriginal 的其他作品

查看全部 →