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

[Gold Discord] Core


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   General Purpose       
JDW
Junior Member
Join Date: Jul 2020
Old 07-04-2020 , 17:36   [Gold Discord] Core
Reply With Quote #1

[Description]
A simple library for working with webhooks discord on amxmodx

[Example]

PHP Code:
#include <amxmodx>
#include <discord>

#pragma semicolon 1

static const webHook[] = "example";

public 
plugin_init()
{
    
register_plugin("[Discord] Example""1.0""JDW");

    
register_clcmd("say /example""ExampleCommand");
}

public 
ExampleCommand(id)
{
    if (
Discord_StartMessage())
    {
        
Discord_SetStringParam(USERNAME"JDW");
        
Discord_SetStringParam(CONTENT"Hello, world");
        
Discord_AddField("Field""Test");
        
Discord_SendMessage(webHook);
    }

    return 
PLUGIN_HANDLED;

In configs/discord.cfg

"example" "your webhook"

[Requirements]
Amx mod X 1.9+
https://forums.alliedmods.net/showthread.php?t=315567

[Version]
1.0 - Released

[Modules]
https://github.com/JDW1337/Gold-Disc...dules/session/ - Duration of the administrator session.


Source : https://github.com/JDW1337/Gold-Discord
Attached Files
File Type: zip Discord.zip (6.9 KB, 412 views)

Last edited by JDW; 07-04-2020 at 17:37.
JDW 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 01:02.


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