Skip to content
/ EvolveJS Public
forked from Blazify/evolvejs

EvolveJS - A Discord Library written in Typescript for Javascript and Typescript.

License

Notifications You must be signed in to change notification settings

Olyno/EvolveJS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


EvolveJS Logo


Discord Twitter License Downloads Dependencies


Status Banner

<iframe src="https://discordapp.com/widget?id=736450058664411166&theme=dark" width="350" height="500" allowtransparency="true" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>

What is EvolveJS?

EvolveJS is a Discord Library in which bots can be made. We provide high control over the module so that the customizability can be the top of the level. Have fun with the library and happy coding :)

Installation

Using the Node Package Manager (NPM)

npm install @evolvejs/evolvejs

Important

You need the following things before you can kick off with EvolveJS:

Documentation and Support

  • Official Docs Note :- The Docs aren't completed
  • For any further query and support join us at EvolveJS discord.

Basic Startup Guide

Example code for running the client

const { EvolveBuilder, GatewayIntents, CacheOptions } = require("@evolvejs/evolvejs")
const client = new EvolveBuilder()
                    .setToken("")
                    .setShards(2)
                    .enableIntents(GatewayIntent.GUILD)
                    .enableCache(CacheOptions.GUILD)
                    .build()

client.on("clientReady", () => {
  console.log(client.user.username) // logs the client's username when all shard is ready
})

client.sharder.on("shardSpawn", (id) => console.log(`${id} shard is now online`))
client.sharder.on("shardDestroy", (id) => console.log(`${id} shard is destryed`))

client.on("newMessage", (event) => {
  if(event.message.content == "ping") { // checks if the message sent was "ping"
    event.channel.send("Pong") // sends a message with content of "Pong"
    console.log(event.shard) //logs the entire shard websocket in which the event was triggered
  } else if(event.message.content == "shutdown") {
    event.channel.send("Shutting Down");// sends message saying client is shutting down
    client.sharder.shutdown();//proper shard destryoing returns multiple shard destroy event if multiple shards
  })

More Information

  • If you want to use ETF for Payloads Sending, just use EvolveBuilder#setEncoding, make sure to install erlpack, as it's a dev dependency of the package
  • If you want to contribute, you can star the repo or make pull request, but the pull request should be on the development branch, id you are adding anything from #4, just comment saying feature has been implemented

Author(s)

Contributor

  • Put ya name here after contributing

About

EvolveJS - A Discord Library written in Typescript for Javascript and Typescript.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 93.2%
  • JavaScript 6.8%