Garry's Mod

Garry's Mod

评价数不足
[TTT] Customizable Discord Muting/Deafening
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 服务器内容
插件标签: 快乐, 写实
文件大小
发表于
更新日期
19.469 KB
2023 年 3 月 8 日 上午 8:26
2023 年 5 月 25 日 上午 9:38
2 项改动说明 ( 查看 )

订阅以下载
[TTT] Customizable Discord Muting/Deafening

描述
Automatic Discord muting/deafening when configurable TTT events happen.
This addon is highly customizable and can replicate the behavior of other TTT discord addons while being easier to set up.

Setup
  1. Install https://github.com/timschumi/gmod-chttp on the server.
  2. Create a discord bot, add it to your server and give it permission to deafen and mute members.
  3. Set discord_token to your bot's token.
  4. Set discord_guild to your discord server ID[support.discord.com].
  5. Configure the ConVars to your liking (the default values won't do anything).

Example Configurations
Mute on Death
Mute dead players for 10 seconds. Leave discord_dead_duration at 0 to mute them until the end of the round.
discord_dead_mute 1 discord_dead_duration 10
Deaf while Alive
Alive players are deafened while in an active round. Works great alongside a proximity voice chat addon such as this one.
discord_alive_deaf 1

Discord User IDs
We need to know every player's discord user ID[support.discord.com]:
Players can type !discord DISCORD_ID to set their own Discord account.

Superadmins can type !discord DISCORD_ID PLAYER_NAME to set other players' Discord accounts for them.
You could also just manually edit garrysmod/data/discord_player_map.json and insert the steamID[www.steamidfinder.com] → discord user ID mappings as JSON:
{ "STEAM_0:0:12345678": "12345678912345678", "STEAM_0:0:12345679": "12345678912345679" }

All ConVars
ConVar
Default
Description
discord_enable
1
Enable / disable the bot
discord_token
Set the bot token
discord_guild
Set the guild the bot is in
discord_mute_icon_enabled
1
Should muted players have a mute icon in the top right of their screen?
discord_alive_mute
nil
Alive players are muted? (1 = true, 0 = false, "nil" = no override)
discord_alive_deaf
nil
Alive players are deaf? (1 = true, 0 = false, "nil" = no override)
discord_dead_mute
nil
Dead players are muted? (1 = true, 0 = false, "nil" = no override)
discord_dead_deaf
nil
Dead players are deaf? (1 = true, 0 = false, "nil" = no override)
discord_dead_duration
0
How long should the death voice state be applied for in seconds? (0 = unlimited)
discord_ttt_inactive_mute
0
Overrides mute state of everyone when not an active round (1 = true, 0 = false, "nil" = no override)
discord_ttt_inactive_deaf
0
Overrides deaf state of everyone when not an active round (1 = true, 0 = false, "nil" = no override)
discord_ttt_preparing_active
0
Treat TTT preparing as active?
discord_ttt_postround_active
0
Treat TTT postround as active?

Commands
discord_pause
Pause/Unpause the addon. Pausing will temporarily unmute and undeafen everyone.


For more information, see the GitHub: https://github.com/ruby0b/ttt-discord-bot
5 条留言
zugiツ 2023 年 8 月 20 日 下午 4:06 
hey ich probiere schon seit tagen dein addon auf meinen server zu benutzen und vor monaten, hat das auf einem anderen server noch gut geklappt, aber es will irgendwie nicht mehr gehen. ich hab mehrmals die anleitungen gelesen und befolgt aber es will nicht mehr. kannst du mir da helfen
Torque 2023 年 5 月 25 日 上午 10:03 
Thxs
ruby0b  [作者] 2023 年 5 月 25 日 上午 9:48 
I just added a !discord chat command that allows players to set their own Discord IDs (see the updated description) so you no longer have to enter them yourself.

(You can forbid players from setting their own Discord IDs by taking away their discord_manage ULib permission.)
Torque 2023 年 5 月 21 日 下午 2:14 
Do you have to put in the ids for every person who joins?
Confector 2023 年 3 月 8 日 下午 2:41 
10/10