Garry's Mod

Garry's Mod

Garry's Mod Discord Bot
 이 토론은 고정되었습니다. 중요해서 그렇겠죠?
timschumi  [개발자] 2019년 11월 20일 오전 11시 15분
Tech Support, Installation Help, etc.
Well, what the title says.

If you are posting here, please include the following information:
  • OS
  • Using CHTTP/STEAMHTTP (or not)
timschumi 님이 마지막으로 수정; 2020년 1월 14일 오전 5시 04분
< >
전체 댓글 17개 중 1~15개 표시 중
Spudmonkey 2019년 11월 20일 오후 3시 38분 
Reposting my issue like you asked:

Hi, I get the following errors: 'Got an HTTP error code that is neither 200, nor 403: 401' when trying to use the !discord command, and

[Discord] [ERROR] HTTP error during request
[Discord] [ERROR] method: GET
[Discord] [ERROR] endpoint: '/guilds/142757984487866368/members?limit=20'
[Discord] [ERROR] err: Couldn't resolve host name

when I changed the discord_api to h.t.t.p.s discordapp.com/api
Spudmonkey 2019년 11월 20일 오후 3시 39분 
I'll try putting quotes around the API and having a look at the token. Is the token the bot secret or is it the bot token?
timschumi  [개발자] 2019년 11월 20일 오후 3시 58분 
The Token is the "Bot Token" (found in the Bot tab), not the "Client Secret".
timschumi 님이 마지막으로 수정; 2019년 11월 20일 오후 4시 00분
Spudmonkey 2019년 11월 20일 오후 4시 50분 
I re-downloaded the gmod addon from your github page, set the discord bot token, my discord guild ID and left the discord api setting alone in the in-game console, but I still get the error

[Discord] [ERROR] HTTP error during request
[Discord] [ERROR] method: GET
[Discord] [ERROR] endpoint: '/guilds/142757984487866368/members?limit=20'
[Discord] [ERROR] err: Couldn't resolve host name

Should the discord_sv file in the addon update to reflect what I changed in the dev console?
timschumi  [개발자] 2019년 11월 21일 오전 2시 42분 
You don't need to change anything in the discord_sv file (or basically any file). Those are just the default values that are used if the variable hasn't been overwritten. You need to keep in mind that reinstalling the addon doesn't clear out the settings you made previously. The variables you changed are probably still stored in "<game folder>/garrysmod/cfg/server.vdf". Clearing them out from there should reset the settings to the default.

In case you are still having issues after that, I published a new version to GitHub, as well as the Workshop. It should now dump the full URL when it encounters an error, so maybe we can see what is causing the issues.
Spudmonkey 2019년 11월 21일 오전 6시 13분 
It looks like it's working now! I'll have to wait until tomorrow to properly test it, but it binds to my steam ID now. You were right, in the server.vdf file the discord_api was still set as "https://", not sure how that happened... And I used the secret instead of the token before. Thanks for all the help!
Spudmonkey 2019년 11월 21일 오후 8시 42분 
Just tested it out with some mates, it binds ID's properly now, but now I get the error "Error while muting: 403/50013 - Missing Permissions". The bot is above everyones roles on discord, and it has Mute Members and Deafen Members permissions.
timschumi  [개발자] 2019년 11월 21일 오후 11시 47분 
Might be a stupid suggestion, but have you made sure that you saved your changes when modifying the permissions? I forget to do that quite often.

The only reason where that error would occur is when not all the necessary permissions have been applied. My own bot is configured with "Disable Member input and output" (or something similiar), so it should work in theory. Would you be able to give it full Admin permissions to see if that changes anything?
Spudmonkey 2019년 11월 22일 오전 1시 05분 
If I view the bots permissions in discord Mute and Deafen are still green, so i'm pretty sure it saved. I used the guide from the original ttt discord plugin to make the bot, that should work right? I'll give it admin permissions and see what happens then.
timschumi  [개발자] 2019년 11월 22일 오전 1시 24분 
Ok, so it's not the permissions not being saved. The guide from the original bot will be fine. Keep in mind that the failsafe is now active, you might have to set the `discord_enabled` variable to 1 to make it send requests again.

EDIT: And again, I ♥♥♥♥♥♥ up. Had something messed up with my configuration. Turns out, "Disabling Input/Output of members" (which seems to be "Deafen" in other languages) is totally irrelevant to what the bot does. The important (and the only needed) is actually just the "Mute members" one.
timschumi 님이 마지막으로 수정; 2019년 11월 22일 오전 1시 35분
Spudmonkey 2019년 11월 26일 오후 9시 03분 
Sorry for the late reply, only just got some people on to test it again. It works now! Making the bot an admin and putting it at the top of the role list worked, but i'm not sure why just having mute permissions didn't work though. Doesn't really matter I guess.
timschumi  [개발자] 2020년 5월 14일 오전 11시 51분 
Just set `discord_enabled 1` (which is the "official" way to enable/disable the plugin).
yeet 2020년 8월 15일 오후 5시 47분 
Hi, not sure what I'm doing wrong but I have the bot set up and it links to my discord account using the !discord command in game but for some reason the bot will not mute me. I tried giving it admin perms and moving the role to the top of the list but still no luck.
timschumi  [개발자] 2020년 8월 16일 오전 4시 48분 
Ah, I see what the problem is. I'll push out a fix in a few minutes.
timschumi  [개발자] 2020년 8월 16일 오전 4시 52분 
yeet 님이 먼저 게시:
Hi, not sure what I'm doing wrong but I have the bot set up and it links to my discord account using the !discord command in game but for some reason the bot will not mute me. I tried giving it admin perms and moving the role to the top of the list but still no luck.

I pushed out an update, please try again. This probably won't fix the issues you originally had, but it will at least display an error message again.
< >
전체 댓글 17개 중 1~15개 표시 중
페이지당 표시 개수: 1530 50