Coder Social home page Coder Social logo

r3diance / discord-server-manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from killstr3ak/discord-server-manager

0.0 1.0 0.0 19 KB

Players have to link their discord account before they could use the restricted commands

SourcePawn 100.00%

discord-server-manager's Introduction

discord-server-manager

Players have to link their discord account before they could use the restricted commands

Description

This is a discord version of the SWGM plugin, it was requested HERE by paulo_crash Players can't use the restricted commands if they are not connected to the discord server.

When a player connect, he will get an assign ID, with he can link his account through discord.

Known bugs

If a player disconnect from the discord server after he has linked it ingame, it wont be refreshed, I'll fix it in the next release.

Dependencies

You can't run this plugin at all without Discord-API SMJansson - Required for Discord-API SteamWorks - Required for Discord-API

Installation

Create a discord bot, and a new channel in your server Upload the smx and the .ini to your server Edit the "cfg/sourcemod/discord_server_manager.cfg" with your details

Cvars

dsm_token "" // Your discord bot token dsm_channel_id "" // Channel ID in discord where the players can link their accounts dsm_assign_command "!link" // Command in discord to link the account. eg.( !link 12345 ) dsm_use_swgm "0" // 1 - Use the same .ini as the SWGM for the commands | 0 - Use a new ini (configs/dsm/command_listener.ini)

Commands

sm_link //The player can get his assign id with this command

Natives && Forwards

/**

  • Check if the client has linked his account
  • @param client Client Index.
  • @return True if the client has an accountlinked, false otherwise. */ native bool DSM_IsDiscordMember(int client);

/**

  • Called when a player has linked his account
  • @param client client that has linked the account. */ forward void DSM_OnClientLinkedAccount(int client);

discord-server-manager's People

Contributors

killstr3ak avatar r3diance avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.