Raised This Month: $403 Target: $400
 100% 

[ANY] Discord/Slack API (CallAdmin, SourceBans, ...)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Plugin ID:
5487
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 01-11-2017 , 09:59   [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
    Reply With Quote #1

    About

    A pretty simple plugin that allows you to send JSON messages to Discord and Slack.

    Features
    • Command to test the API: sm_testdiscord <webhook> <message>
    • Auto format plain text into JSON for slack & discord
    • Auto resend msg if the API is busy

    Requires: SteamWorks

    Installation

    discord.smx -> addons/sourcemod/plugins/
    discord.cfg -> addons/sourcemod/configs/

    Add your WebHook URLs to discord.cfg, if you are using Discord don't forget to add /slack to the end of the webhook url.
    WebHook URLs can be created in your channel settings on discord.

    Module: CallAdmin

    Requires: Calladmin

    discord_calladmin.smx -> addons/sourcemod/plugins/

    Admin-Commands:
    • sm_claim - Sends a message to your calladmin channel informing everyone you are on the server taking care about reports.

    discord_calladmin.cfg


    Module: SourceBans/SourceComms

    Requires: SourceBans++ (edited version, original sourcebans has no ban forwards, feel free to request compability for other sourcebans versions)

    discord_sourcebans.smx -> addons/sourcemod/plugins/
    discord_sourcecomms.smx -> addons/sourcemod/plugins/

    discord_sourcebans.cfg

    discord_sourcecomms.cfg


    Download

    gitlab.com/Zipcore/Discord/





    Quote:
    Originally Posted by blackhawk74 View Post
    Nice plugin zipcore, thank you!

    For anyone wondering how to mention specific roles besides @here or @everyone, let's use an example:

    You want to mention the @admins role. First we need to get the Role ID. You can do this by typing \@admins in your discord server, this will output a string similar to this: <@&164103385761892222>

    So then in discord_calladmin.cfg we'll have this:
    discord_calladmin_mention "<@&164103385761892222>"

    and ta-da, you're done! Figured that would be helpful since it took me a little while to figure out how to do this, d'oh!
    __________________

    Last edited by zipcore; 01-14-2017 at 05:41.
    zipcore is offline
    hakan9878
    Junior Member
    Join Date: Aug 2015
    Old 01-11-2017 , 10:04   Re: Discord/Slack API (CallAdmin, Sourcebans, ...)
    Reply With Quote #2

    Running it on my server! works pretty well
    hakan9878 is offline
    darkyy1994
    Member
    Join Date: Feb 2015
    Old 01-11-2017 , 10:18   Re: Discord/Slack API (CallAdmin, Sourcebans, ...)
    Reply With Quote #3

    nice work! i will install it on my server too

    thank you



    EDIT: i installed it works without problems thank you

    Last edited by darkyy1994; 01-11-2017 at 22:07.
    darkyy1994 is offline
    evgShuter
    New Member
    Join Date: Jan 2017
    Location: NA
    Old 01-11-2017 , 10:19   Re: Discord/Slack API (CallAdmin, Sourcebans, ...)
    Reply With Quote #4

    nice release buddy!

    Great work
    evgShuter is offline
    Simon.
    Member
    Join Date: Oct 2016
    Location: Sweden
    Old 01-11-2017 , 10:48   Re: Discord/Slack API (CallAdmin, Sourcebans, ...)
    Reply With Quote #5

    nice one!
    __________________
    Simon. is offline
    Addicted.
    AlliedModders Donor
    Join Date: Dec 2013
    Location: 0xA9D0DC
    Old 01-11-2017 , 15:07   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
    Reply With Quote #6

    Great idea! Another nice release!
    Addicted. is offline
    SHUFEN.jp
    Senior Member
    Join Date: Jun 2014
    Location: Japan, Tokyo
    Old 01-11-2017 , 20:27   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
    Reply With Quote #7

    good well!!
    try that in my one.
    SHUFEN.jp is offline
    Send a message via Skype™ to SHUFEN.jp
    zipcore
    Veteran Member
    Join Date: Mar 2010
    Location: m_flZipcore
    Old 01-12-2017 , 02:38   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
    Reply With Quote #8

    Update
    Added !claim command for discord_calladmin module.
    __________________
    zipcore is offline
    Bchewy
    AlliedModders Donor
    Join Date: Nov 2014
    Old 01-12-2017 , 07:55   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
    Reply With Quote #9

    Niceeeeee!
    __________________
    Bchewy is offline
    T1MOXA
    Member
    Join Date: Aug 2016
    Old 01-12-2017 , 18:55   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
    Reply With Quote #10

    I have an error.

    [discord.smx] [OnRequestComplete] Bad Request! Error Code: [400]. Check your message, the API doesn't like it! Message: "{"attachments": [{"color": "#ff2222","title": "View on Sourcebans","title_link": "http://***/index.php?p=banlist&searchText=STEAM_1:1:***" ,"fields": [{"title": "Player","value": "T1MOXA ( STEAM_1:1:*** )","short": true},{"title": "Admin","value": "T1MOXA","short": true},{"title": "Ban Length","value": "1 min","short": true},{"title": "Reason","value": "1","short": true}]}]}"

    Where in this query error ?
    (I have my own alteration of sourcebans, maybe that's the reason)

    Last edited by T1MOXA; 01-13-2017 at 06:05.
    T1MOXA is offline
    Reply


    Thread Tools
    Display Modes

    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 10:11.


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