GithubHelp home page GithubHelp logo

raidandfade / haxicord Goto Github PK

View Code? Open in Web Editor NEW
58.0 7.0 10.0 1.02 MB

The most popular discord API Haxe library (because no others are good enough to be called a library)

Home Page: https://raidandfade.github.io/Haxicord/

License: GNU General Public License v3.0

Haxe 100.00%
haxe discord library discord-haxe haxelib haxe-discord haxe-library discord-api discord-library haxe-js

haxicord's People

Contributors

alekeagle avatar apprentice-alchemist avatar emzi0767 avatar raidandfade avatar sophiaperzan avatar tamarantula avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

haxicord's Issues

Basic shit

  • Finish all REST endpoints
  • Finish all WS events and such (no voice)
  • Document
  • Document REST
  • Document WS

Working Target List

Working Targets :

  • Neko
  • CPP
  • C#
  • NodeJS
  • PHP
  • Java
  • Python
  • Browser JS (probably not happening, considering Browsers cant set useragents)
  • Lua

If you want one of these targets, mention it in this issue and i will get to it eventually.

Main TODO list

Completion / Feature list (for my own sake)


Websocket :

  • Connect and Identify
  • Heartbeat
  • Ready
  • Bootleg resume (Reconnect on disconnect)
  • Resume
  • Handle events

REST

  • requests implemented with headers and proper POST/GET data
  • request proper error handling (returns in callback rather than throwing in request)
  • Burst ratelimiting methods to make sure 429s do not happen
  • Global ratelimit watch/handler
  • Implement every single documented v5 route
  • Document every single v5 route. Document permissions required as well
  • Document every typedef used for the routes.
  • Find audit log and impl

Working Targets :

  • Neko
  • CPP
  • C#
  • NodeJS
  • PHP
  • Java
  • Python
  • Browser JS (probably not happening, considering Browsers cant set useragents)
  • Lua

Some types are not found: haxe compiler

Here's my code (from readme) from /dbothaxe/Main.hx:

package dbothaxe;

import com.raidandfade.haxicord.commands.CommandBot;
import com.raidandfade.haxicord.types.Message;

class Main extends CommandBot {
	static function main() {
		new Main("<token>", Main, "-"); // Create an instance of Commandbot with the prefix `-`
	}

	@Command
	function ping(message:Message) {
		message.react(""); // React to the message with "✅"
		message.reply({content: "Pong!"}); // Send "Pong!" in the same channel
	}
}

/build.hxml:

--interp

# libraries
-lib Haxicord 
# "-lib haxicord" doesn't working too

# build
-cp dbothaxe
-main dbothaxe.Main

Problems:
vshaxe (vscode extension for Haxe) throwing me this error: Invalid commandline class : Main should be dbothaxe.Main, but Haxe compiler gives me this:

dbothaxe/Main.hx:3: characters 8-52 : Type not found : com.raidandfade.haxicord.commands.CommandBot
dbothaxe/Main.hx:4: characters 8-46 : Type not found : com.raidandfade.haxicord.types.Message
dbothaxe/Main.hx:6: characters 20-30 : Type not found : CommandBot

P.S: I'm starting the project by haxe dbothaxe/Main.hx

What I'm doing wrong?

There is a memleak... somewhere......

I've yet to do any real diagnosis or testing, but the bot uses much more memory than it technically should (like 10x more)

I believe it might be because of the cache and how cache is not limited (and can thus lead to millions of messages in cache). This will be patched as soon as i can access the source again. (no access to desktop right now)

DCE Removing Commands

Dunno if you'd consider this an issue, but with --dce full commands get removed, maybe there's a way through the Compiler/Context class or something to stop this automatically.

It confused me for a while and some people might want to use dce everywhere else without putting @:keep on their CommandBot class / all of the commands.

How to get this started with the new API?

Both the command example in the README.md and the "normal users" examples do not run, what happens is the application opens, runs through the commands and instantly exits with nothing blocking. I can't use client.start() cause that's deprecated now and I tried artificially blocking with while(true) {} but that also gave me no onReady callback

Type not found : websocketsharp.WebSocket when building for c#

i tried to build on csharp but i gives me this error
C:\HaxeToolkit\haxe\lib\haxicord/git/src/com/raidandfade/haxicord/websocket/WebSocketConnection.hx:14: characters 8-32 : Type not found : websocketsharp.WebSocket C:\HaxeToolkit\haxe\lib\haxicord/git/src/com/raidandfade/haxicord/websocket/WebSocketConnection.hx:21: characters 27-36 : Type not found : WebSocket see my repo : https://github.com/Xephobia/friccBot (used the command haxe csharp.hxml)

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.