
使用 Discord Webhooks 的截图上传工具
警告: 此模组使用一种不安全的方式在客户端和服务器之间传输 webhook 信息(URL)。这意味着用户可能会无意中获取到 webhook URL。这是设计使然。该模组旨在供一小群朋友使用,他们希望有一种简单且轻量级的方法将截图上传到 Discord 的各个频道。泄露的 webhook URL 可能会被用于在特定频道发布恶意消息或附件。请自行承担风险。
SSHook 提供了一种简便的方法,让用户通过 webhook 集成功能将截图上传到 Discord。每当用户截取屏幕时,系统会提示一个可配置的 webhook(Discord 频道)列表以供选择上传。如果客户端启用了 'enableServerOverride' 配置选项,webhook 将在客户端和服务器之间同步。这意味着只有服务器管理员需要定义 webhook;模组会自动处理同步工作。如果玩家决定上传,发送的 Discord 消息外观如下:

客户端:
所有用户都可以定义客户端本地的 webhook,并使用切换配置选项来显示上传提示。如果用户连接到安装了该模组的服务器(并且客户端设置了 enableServerOverride),服务器会将适用的 webhook 发送给客户端以替代本地设置。默认情况下,此选项处于启用状态。
服务器:
为了让客户端上传截图,服务器本身不需要安装此模组,但每个客户端必须在配置文件中单独定义 webhook(因此需要手动分享 webhook URL)。如果服务器上安装了该模组,将会生成一个独立的配置文件,服务器管理员可以在其中定义要分享给客户端的 webhook。
配置:
客户端:有关每个选项的具体作用,请参阅 sshook.json。你也可以通过 Cloth API 访问游戏内配置界面。
服务器:sshook-server.json 在安装服务器时会生成,它包含三个选项:
- enableBotNameOverride:这将用上传截图的 Minecraft 用户名及其头像替换 webhook(机器人)的名称。
- webhooks:在此处定义 webhook 的名称和 URL。
- customServerName:此配置项用于设置嵌入消息中的“服务器”类别。如果留空,则默认使用服务器 IP。

Screenshot Uploader using Discord Webhooks
WARNING: This mod uses an insecure way to transmit webhook information (URLs) between the client and server. This means users could gain unintentional access to the webhook URL. This is by design. This mod is intended for small groups of friends who want an easy and lightweight way to upload their screenshots to various channels in Discord. A leaked webhook URL could be used to post malicious messages or attachments in a specific channel. USE AT YOUR OWN RISK.
SSHook is an easy way for users to upload screenshots to Discord using the webhook integration feature. Every time a user takes a screenshot, they will be prompted with a configurable list of webhooks (Discord channels) to upload the screenshot. The webhooks are synced between the client and server if the client has the 'enableServerOverride' config option set. This means that only the server owner has to define the webhooks; the mod handles syncing them. If a player decides to upload, it sends a discord message that looks like:

CLIENTS:
All users can define client-side webhooks and use a toggle config option to display the upload prompt. If the user connects to a server with the mod installed (and enableServerOverride is set on the client), the server will send applicable webhooks to the client to use instead. By default, this option is enabled.
SERVERS:
Servers do not need this mod for clients to upload screenshots, but each client must define the webhooks individually in the config (and therefore, manually share the webhook URLs). If the mod is installed on the server, a separate config file will be created where the server owner can define webhooks to be shared with the clients.
CONFIG:
CLIENTS: See sshook.json for details on what each option does. You can also visit the in-game configuration through the Cloth API.
SERVERS: sshook-server.json is generated with server installations, it has three options:
- enableBotNameOverride: This will replace the webhook (bot) name with the Minecraft username of the person who uploaded and their avatar.
- webhooks: This is where you can define the name and URL of the webhook.
- customServerName: This configures the 'Server' category in the embed. If left blank, the server IP will be defaulted.
下载 SSHook
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SSHook
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SSHook
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SSHook
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 SSHook
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
评论 0
登录后参与评分
还没有评论,来抢沙发吧