Raised This Month: $32 Target: $400
 8% 

[Any] Discord Relay (v0.7.8, 4/21/22)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Logical
New Member
Join Date: Aug 2020
Location: New York
Plugin ID:
7596
Plugin Version:
0.7.8
Plugin Category:
All
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Discord ⇄ Server message interaction.
    Old 04-11-2021 , 15:29   [Any] Discord Relay (v0.7.8, 4/21/22)
    Reply With Quote #1

    Installation

    Place discordrelay.smx inside of ./cstrike/addons/sourcemod/plugins and change convars to your liking in ./cstrike/cfg/sourcemod/discordrelay.cfg after running the plugin

    Dependencies

    SteamWorks - https://forums.alliedmods.net/showthread.php?t=229556

    Discord-api - https://forums.alliedmods.net/showthread.php?t=292448

    Ripext (sourcemod REST api) - https://forums.alliedmods.net/showthread.php?t=298024

    Examples
    Discord -> Server
    https://prnt.sc/119uzjm

    Server -> Discord
    https://prnt.sc/119uqvu


    Extra Information
    This should work on all games; however, I have yet to test it on anything other than CS:S.

    Features

    - Client steam avatars for discord webhook pfp

    - Map Change and Client Connect/Disconnect messages

    - Client messages sent to discord (commands can be ignored using cvars)

    - SBPP ban and mute messages

    - RCon channel in discord

    Configuration
    Read the README on the github.
    https://github.com/log-ical/sp-disco...main/README.md

    Github link https://github.com/IsThatLogic/sp-discordrelay
    Attached Files
    File Type: smx discordrelay.smx (24.6 KB, 157 views)
    File Type: sp Get Plugin or Get Source (discordrelay.sp - 114 views - 24.3 KB)

    Last edited by Logical; 06-08-2022 at 20:55. Reason: update
    Logical is offline
    NanoC
    Veteran Member
    Join Date: Jan 2016
    Location: Argentina
    Old 04-11-2021 , 15:56   Re: [CS:S] Discord Relay (v0.1.5, 4/11/21)
    Reply With Quote #2

    Why "[CS:S]" ?
    It should work for any game
    __________________
    NanoC is offline
    Send a message via Skype™ to NanoC
    Logical
    New Member
    Join Date: Aug 2020
    Location: New York
    Old 04-11-2021 , 16:25   Re: [CS:S] Discord Relay (v0.1.5, 4/11/21)
    Reply With Quote #3

    Quote:
    Originally Posted by NanoC View Post
    Why "[CS:S]" ?
    It should work for any game
    The way I'm handling colors is by using morecolors and it only supports:
    Team Fortress 2
    Counter-Strike: Source
    Half-Life 2: Deathmatch
    Day of Defeat: Source

    I also only tested this on CS:S. In the future though, I do want to change how the colors are handled, and then add official support for more games. Theoretically, the plugin should work on all games like you said, but I can't say with certainty that it will work as intended, that's why I just gave it the CS:S tag, maybe that was the wrong way to do it, if so I can change it.
    Logical is offline
    NanoC
    Veteran Member
    Join Date: Jan 2016
    Location: Argentina
    Old 04-11-2021 , 19:34   Re: [CS:S] Discord Relay (v0.1.5, 4/11/21)
    Reply With Quote #4

    Quote:
    Originally Posted by Logical View Post
    The way I'm handling colors is by using morecolors and it only supports:
    Team Fortress 2
    Counter-Strike: Source
    Half-Life 2: Deathmatch
    Day of Defeat: Source

    I also only tested this on CS:S. In the future though, I do want to change how the colors are handled, and then add official support for more games. Theoretically, the plugin should work on all games like you said, but I can't say with certainty that it will work as intended, that's why I just gave it the CS:S tag, maybe that was the wrong way to do it, if so I can change it.
    You can maybe use multicolors, that's better
    __________________
    NanoC is offline
    Send a message via Skype™ to NanoC
    Logical
    New Member
    Join Date: Aug 2020
    Location: New York
    Old 04-16-2021 , 22:35   Re: [CS:S] Discord Relay (v0.1.5, 4/11/21)
    Reply With Quote #5

    Quote:
    Originally Posted by NanoC View Post
    You can maybe use multicolors, that's better
    Thanks, just updated it to work with multicolors.

    Last edited by Logical; 04-16-2021 at 22:35. Reason: I know English
    Logical is offline
    NanoC
    Veteran Member
    Join Date: Jan 2016
    Location: Argentina
    Old 04-17-2021 , 00:09   Re: [Any?/CS:S] Discord Relay (v0.2.0, 4/16/21)
    Reply With Quote #6

    Good job!
    Nice plugin.
    __________________
    NanoC is offline
    Send a message via Skype™ to NanoC
    NanoC
    Veteran Member
    Join Date: Jan 2016
    Location: Argentina
    Old 04-18-2021 , 19:11   Re: [Any?/CS:S] Discord Relay (v0.2.0, 4/16/21)
    Reply With Quote #7

    L 04/18/2021 - 20:11:12: [SM] Exception reported: Client index 0 is invalid
    L 04/18/2021 - 20:11:12: [SM] Blaming: discordrelay.smx
    L 04/18/2021 - 20:11:12: [SM] Call stack trace:
    L 04/18/2021 - 20:11:12: [SM] [0] GetClientAuthId
    L 04/18/2021 - 20:11:12: [SM] [1] Line 248, discordrelay.sp:rintToDiscordSay
    L 04/18/2021 - 20:11:12: [SM] [2] Line 187, discordrelay.sp::OnClientSayCommand_Post

    Also avatars don't work

    __________________

    Last edited by NanoC; 04-18-2021 at 19:12.
    NanoC is offline
    Send a message via Skype™ to NanoC
    Logical
    New Member
    Join Date: Aug 2020
    Location: New York
    Old 04-18-2021 , 23:14   Re: [Any?/CS:S] Discord Relay (v0.2.0, 4/16/21)
    Reply With Quote #8

    Quote:
    Originally Posted by NanoC View Post
    L 04/18/2021 - 20:11:12: [SM] Exception reported: Client index 0 is invalid
    L 04/18/2021 - 20:11:12: [SM] Blaming: discordrelay.smx
    L 04/18/2021 - 20:11:12: [SM] Call stack trace:
    L 04/18/2021 - 20:11:12: [SM] [0] GetClientAuthId
    L 04/18/2021 - 20:11:12: [SM] [1] Line 248, discordrelay.sp:rintToDiscordSay
    L 04/18/2021 - 20:11:12: [SM] [2] Line 187, discordrelay.sp::OnClientSayCommand_Post

    Also avatars don't work

    Went ahead and fixed that first error, I assume it was caused by the server sending a message - when messages get sent to discord what it used to do was grab the userid of the client so it could display it in the webhook name, now what I did was just set the name to Server if the client is invalid or 0. There shouldn't be a circumstance where any invalid client index (other than 0 which is the server) should be sending a message though, but if there is it shouldn't cause an issue anymore.

    As for your second issue with the avatars not showing up, try making sure your steam API key is correct and try reinstalling ripext https://github.com/ErikMinekus/sm-ripext/releases/. When testing v0.2.0 I was running into an issue with the avatars not showing up either, but I just reinstalled ripext and it magically fixed itself and didn't have any troubles since so I'm not really sure what was going on.
    Logical is offline
    iDini
    Junior Member
    Join Date: Jul 2020
    Old 04-21-2021 , 19:24   Re: [Any?/CS:S] Discord Relay (v0.3.0, 4/18/21)
    Reply With Quote #9

    Set it up perfectly and getting this when anyone types

    src/common/httpclient.cpp (780) : Assertion Failed: pHost && *pHost
    src/common/httpclient.cpp (780) : Assertion Failed: pHost && *pHost
    L 04/21/2021 - 23:231: [discord_api.smx] [DISCORD] Couldn't Send Webhook - Fail 0 0
    iDini is offline
    hjkwe654
    Member
    Join Date: Sep 2005
    Location: Taiwan
    Old 01-01-2024 , 03:01   Re: [Any] Discord Relay (v0.7.8, 4/21/22)
    Reply With Quote #10

    Same problem here, cant send server messages to discord:

    Code:
    src\common\httpclient.cpp (808) : pHost && *pHost
    L 01/01/2024 - 15:59:01: [discord_api.smx] [DISCORD] Couldn't Send Webhook - Fail 0 0
    btw, Discord to Server is working.

    Last edited by hjkwe654; 01-01-2024 at 03:01.
    hjkwe654 is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 22:45.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode