Coder Social home page Coder Social logo

discord's Introduction

FiveM Discord Integration

This plugin provides basic player statuses and allows plugins to set their own custom statuses easily.

Discord Integration Example

This plugin has no dependencies! โœจ

Features

The plugin will display the following statuses by default:

  • Standing on [Street Name]
  • Running down [Street Name]
  • Getting into a Vehicle
  • Idling on [Street Name]
  • Speeding down [Street Name]

Configuration

To make the plugin work you will have to create a Discord App that will integrate with the API. Make your changes to options.lua. When configured, it will look something like this:

Options = {
    AppID     = "00000000000000",
    AssetName = "asset_name",
    IconText  = "Text on Icon Hover",
}

Integrations

If you want to set your own custom statuses, you can use client events to set a custom one, and lock if to that if you want to prevent other plugins from changing it.

Setting a Custom Status

To set a custom status (that won't change until it is reset), you can do something along these lines:

TriggerEvent("discord:setCustom", "Testing a Plugin")

Reset Custom Status

Resetting the status will allow the plugin to display its normal statuses. This will also reset the lock!

TriggerEvent("discord:resetCustom")

Locking the Status

Lock the status so that other plugins can't change your status. Any attempt to change the custom status will be ignored until it is unlocked.

TriggerEvent("discord:lock")

Unlocking the Status

Unlocks the status so that it can be changed by other plugins.

TriggerEvent("discord:unlock")

License

This project is licensed under the MIT license.

discord's People

Contributors

evandarwin avatar

Stargazers

 avatar

Watchers

 avatar  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.