Git Product home page Git Product logo

discord.v's Introduction

discord.v

Yet another feature-rich Discord Bot Framework written in V (WIP)

Example

import discordv as vd

fn main() {
    mut client := vd.new(token: 'token') ?
    client.on_message_create(on_ping)
    client.open() ?
}

fn on_ping(mut client vd.Client, evt &vd.MessageCreate) {
    if evt.content == '!ping' {
        client.channel_message_send(evt.channel_id, content: 'pong!') or { }
    }
}

More examples

How to install

discord.v uses openssl, be sure it is installed apt install libssl-dev

Only way to run it on Windows is to use WSL (or install openssl headers somehow)

git clone https://github.com/Terisback/discord.v.git ~/.vmodules/discordv

And then import discordv wherever you like

TODO()

First milestone

  • Connect to gateway
  • Handle heartbeat
  • Event system (pub/sub)
  • REST for sending messages
  • Implement multipart/form-data for file sending
  • Do usual application/json for sending without binary data
  • Handle Gateway events
    • Audit Log
    • Channel
    • Emoji
    • Guild
    • Invite
    • User
    • Voice
    • Webhook
    • Slash Command
  • Create examples (3/4)
  • Documentation

Second milestone

  • Handle REST
    • Audit Log
    • Channel
    • Emoji
    • Guild
    • Invite
    • User
    • Voice
    • Webhook
    • Slash Command
    • Observe rate limits (thanks to @div72)
  • Slash Commands
  • Fancy log
  • Command router
  • Think about tests

Third milestone (till V v0.3)

  • Translate dispatch to generics (not sure about that)
  • Build cache ontop map's (memcache, redis in future)

The Main one

  • Make a cool library

Contact

Feel free to contribute ;)
You can contact me at discord: TERISBACK#9125

discord.v's People

Contributors

androz2091 avatar div72 avatar terisback 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.