Raised This Month: $51 Target: $400
 12% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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.
    DO NOT add your webhook URL inside any module config unless you know what you are doing...
    WebHook URLs can be created in your channel settings on discord.

    Module: CallAdmin

    Requires: Calladmin (sm_calladmin_admin_action has to be set to 0 or 2)

    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; 04-12-2021 at 11:46.
    zipcore is offline
     



    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 18:50.


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