GithubHelp home page GithubHelp logo

samuelnunesdev / bot-discord-service Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 97 KB

Serviço de envio de mensagens por bot do discord

License: MIT License

Shell 0.83% PHP 81.75% JavaScript 0.54% Blade 16.89%
api discord-bot laravel9 notification-service webservice

bot-discord-service's Introduction

Notifications via discord bot

🤔 About the service

👨‍💻 Installation

  1. After cloning the project, run:
composer install
  1. Create a Discord application.

  2. Click the Create a Bot User button on your Discord application.

  3. Paste your bot's API token, found under App Bot User, in your services.php config file:

    // config/services.php
    'discord' => [
        'token' => 'YOUR_API_TOKEN',
    ],
  1. Add the bot to your server and identify it by running the artisan command:
    php artisan discord:setup

🧐 How to use

  • Make a post request (example: http://localhost:8000/api/send):
  • The "message" attribute generates a simple text message.
  • The "embed" attribute is an object and each attribute is responsible for generating an embed.
  • The "channel_id" attribute is the id of the channel where you want to send the message.
$ curl -d '{
  "message": "",
  "embed": {
    "title": "Embed Title",
    "type": "rich",
    "description": "content embed",
    "color": "777",
    "timestamp": "2022-04-18T22:42Z"
  },
  "channel_id": "000000000000"
}' -H 'Content-Type: application/json' http://localhost:8000/api/send

bot-discord-service's People

Contributors

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