Garry's Mod

Garry's Mod

평점이 부족합니다.
Garry's Mod Discord Bot
   
어워드
즐겨찾기
즐겨찾기됨
즐겨찾기 해제
Content Type: Addon
Addon Type: ServerContent
Addon Tags: Roleplay, Realism
파일 크기
게시일
업데이트일
23.302 KB
2019년 11월 8일 오전 4시 50분
2022년 1월 3일 오후 1시 51분
업데이트 노트 18개 (보기)

다운로드 위해 구독하기
Garry's Mod Discord Bot

설명
This is a Discord bot for Garry's Mod that directly interfaces with the Discord API. It automatically mutes players when they die in-game and unmutes them when revived.

Please don't ask for help in the comments or via PM, there is a Discord support server[discord.gg] or a Steam Workshop discussion for that. I will not accept any friend requests from people I don't know. I reserve my right to ignore (and occasionally clean up) support questions in the comments, since the feature is simply unfit for that purpose.

The plugin doesn't work fully standalone right now, since direct HTTP accesses to the Discord API from the GMod User-Agent are disallowed. You will either need an utility that proxies requests with a custom User-Agent or through a custom HTTP library that allows for changing the User-Agent.

One possible custom HTTP module is CHTTP (visit it on GitHub[github.com]), which will be used automatically if it is installed.

If the proxy-method is more desirable, you can change the API URL through the `discord_api` console variable. Please note that the server that you put there will receive your whole request, including the Bot token.

Additionally, this plugin needs a support library, which is available on the workshop as well.

Caveats
  • Since the Discord developers aren't particularly fond of GMod interfacing with the Discord API, I built in a failsafe to not get on their nerves. It will shut down all HTTP requests if an unexpected error is encountered. Exceptions for non-fatal issues will be added over time.

  • This plugin does not have a channel filter. It will mute/unmute people no matter which channel they are in (as long as they are on the Garry's Mod server). This could be restricted by allowing the bot permissions by-channel, but a "permission denied" error can cause the failsafe to activate.

  • The bot does not have player verification. A player can put in the Tag of any User on the server when connecting his Steam account.

Setup

I created a guide that describes the setup process in detail (it even has pictures!).

If you don't want to setup C.H.T.T.P.[github.com] but have a Discord API proxy, you can adjust the URL in the `discord_api` variable. It will send all requests to that URL instead.

Credits
marceltransier (GitHub[github.com], Steam) for the original plugin/bot combo[github.com] that this is based on (although heavily deviated by now).

Contribute
The project is open-source and available on GitHub[github.com]. If you can think of a feature (or even a tiny improvement), I'd love it if you could open an issue or a Pull Request (especially if it's about a better icon, even if that's hardly possible with my immaculate graphic design skills).

Issue reports are totally fine as well of course, even if it's about compatibility with other addons. The worst thing that can happen is that I'll close the bug report with a notice of "has to be fixed on the other end".
인기 토론 모두 보기(2)
17
2020년 8월 16일 오후 2시 51분
고정됨: Tech Support, Installation Help, etc.
timschumi
5
2020년 5월 13일 오전 5시 09분
Discord Bot offline & ingame keine Bestätigung auf !discord
Pittiplatsch
댓글 7
timschumi  [작성자] 2023년 2월 24일 오전 11시 22분 
Die entsprechenden Endpoints sind alle im Discord Developer Portal dokumentiert, so zum Beispiel auch der Endpoint zum ändern von Servermitgliedern: https://discord.com/developers/docs/resources/guild#modify-guild-member
Menzek 2023년 2월 23일 오전 11시 22분 
Super Addon!
Du nutzt requests um z.B. Spieler zu muten.

request("PATCH", "/guilds/"..cvar_guild:GetString().."/members/"..self:getDiscordID(), function(code, body, headers)

Woher weißt du wie du den request addressieren musst? In der Discord-Doku hab ich bislang nichts dazu gefunden ...
Tony Sparrow-Hawk 2020년 4월 13일 오후 3시 24분 
Ohne ist TTT unspielbar, weil jeder meint er könnte noch kurz einen namen schreien
Chriss 2020년 4월 12일 오전 7시 34분 
Ehren Bot
Fummo 2020년 1월 13일 오후 3시 14분 
Very Epic
Inujin 2019년 12월 6일 오전 4시 25분 
Nice Addon funktioniert
Erelut4ble 2019년 11월 13일 오전 11시 08분 
Nice:steambored: