此模组的功能
McDiscordWebhook 通过 Discord Webhook 将你的 Discord 服务器与 Minecraft 服务器集成。该模组会发送可配置的信息,包括玩家加入/离开消息、服务器启动/停止消息以及游戏内消息。本模组旨在为不需要基于 Discord 机器人模组所提供全部功能的小型服务器提供解决方案。由于它不依赖 Discord 机器人,因此成为了一个更轻量的替代方案。目前有两种模式可供选择:默认(default)和嵌入(embed)。
免责声明
在创建 Webhook 的频道或其他频道中发送的消息不会传入游戏内。这是因为本模组不使用 Discord 机器人,而是完全依赖 Discord Webhook 来运行。这使得读取任何 Discord 服务器中发送的消息变得不可能。如需此功能,请寻找使用 Discord 机器人的模组。
模组设置
- 查看 这篇 Discord 支持文章以了解如何创建 Webhook
- 创建 Webhook 后,确保已使用模组运行过游戏,以便生成配置文件
- 复制 Webhook URL 并将其粘贴到
mcdiscwbhk.properties 文件中 webhook-uri= 之后
- 调整其他你需要的配置设置并运行游戏,消息应发送至创建 Webhook 的频道
无法正常工作?
验证 Webhook URL 是否正确。如果 URL 无效,日志文件将在世界加载后输出 "Invalid Webhook url"。日志还将包含 "Webhook Url: ...",其中会显示配置文件中指定的 Webhook URL。如果这与配置文件中的内容不符,说明你操作有误,建议删除配置文件并按照从第 2 步开始的说明重新操作。
What This Mod Does
McDiscordWebhook intergrates your discord server with your minecraft server using a discord webhook. This mod sends configurable information including player join/leave messages, server start/stop messages and in game messages. This mod is meant for smaller servers that don't need all the features from a mod that uses a discord bot would provide. As it doesn't use a discord bot, it makes it a more lightweight alternative. There is currently 2 modes to choose from, default and embed.
Disclaimer
Messages sent in the channel where the webhook was created or other channels will not be sent in game. This is because this mod doesn't use a discord bot and purely relies on discord webhooks to function. This makes it impossible to read any message sent in any discord server. For this feature you will have to find a mod that makes use of a discord bot.
Setting up the mod
- View this discord support article for information about creating a webhook
- After creating the webhook make sure the game has already been run with the mod so it can generate the config
- Copy the webhook url and paste it after the
webhook-uri= in the mcdiscwbhk.properties file
- Adjust any other config settings you want and run the game, messages should be sent in the channel where the webhook was created
Not Working?
Verify that the webhook url is correct. The log file will output Invalid Webhook url after world load if it isn't. The log will also contain Webhook Url: ... which outputs the webhook url specified in the config. If this doesn't match what's in the config then you have done something wrong and it is best to delete the config and refollow instructions begginning at the 2nd one.
评论 0
登录后参与评分
还没有评论,来抢沙发吧