Giter VIP home page Giter VIP logo

seyfert's Introduction

seyfert

Discord.js and Sapphire are deprecated, use Seyfert instead

License Version Discord

FAQ

So, what is seyfert?

Seyfert is the ultimate Discord framework! We make it easy to interact with the Discord API, big cache control, scalable code and a pretty dev experience.

Why should I use it?

There are many reasons to use Seyfert, but they dont all fit in this tiny readme, so here is a list of the most awesome reasons!

  • Low RAM Usage
  • Latest features
  • Dev experience
  • 24/6 support (Sunday is for church)
  • Written from Scratch
  • Type-safe
  • And many more!!

Installation

Note

Node v18>= is required (or v16 with --experimental-fetch flag), Bun/Node LTS recommended.

pnpm add seyfert
bun add seyfert
npm i seyfert

Or other package manager.

Contributing

We are open to contributions, fork the repo and make your changes!

Useful links

seyfert's People

Contributors

dragurimu avatar drylozu avatar evilg-mc avatar fabriziocoder avatar freeaoi avatar marcrock22 avatar mateo-tem avatar monoverde888 avatar mrloldev avatar nejiresupremacy avatar nicolito128 avatar nobody-uu avatar pablornc avatar paperdave avatar renovate[bot] avatar santi24yt avatar simxnet avatar socram03 avatar suanfanson avatar teaishealthy avatar vanstk avatar xenofic avatar yuzudev 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  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

seyfert's Issues

basic refactoring of @biscuitland/ws

Which package is the feature request for?

ws

Feature

The code has been cleaned up and restructured to make it simpler.

The gateway will not expose an adapter due to the complexity of the gateway and users are urged to implement the existing solution in addition to the handler.

In the future, the concept of platforms and transports will be added.

Platforms will be systems (such as adapters) to manage and route usage, while transports will be communication strategies between processes/workers.

  • @biscuitland/ws should be better documented and factored some code.
  • @biscuitland/ws will not be able to be exposed in a pre-finished form and will require the use of platforms and transporters.
  • @biscuitland/ws because of the complexity of the library has been preferred to have a more readable code than the rest of the biscuitland libraries.
  • @biscuitland/ws everything done to make
[Connecting - STEP 1]

    - Client should immediately receive an Opcode 10 Hello payload [READY].
    - Client can start sending Opcode 1 Heartbeat payloads after heartbeat_interval * jitter [NOT READY].
    - The gateway may request a heartbeat from the client in some situations by sending an Opcode 1 heartbeat . When this occurs, the client should immediately send an Opcode 1 Heartbeat without waiting for the remainder of the current interval. [READY]
    - Each time the client sends a heartbeat, the gateway will respond with Opcode 11 Heartbeat ACK [READY].
    - If a client does not receive a heartbeat acknowledgement between its attempts to send heartbeats, this may be due to a failed or "zombie" connection. Then, the client should immediately terminate the connection with a closing code other than 1000 resume<Resume>. [READY]

[identifying - STEP 2]

    - If the payload is valid, the gateway will respond with a ready<Ready> event. [READY]
    - Limited by maximum concurrency the gateway will respond with an Opcode 9 Invalid Session [READY].

[resuming - STEP 3]

    - Disconnects occur, especially with persistent connections. [READY]
    - Due to Discord's architecture, this is a semi-regular event [READY].
    - Your client must store the session_idy resume_gateway_url of the ready<Ready> [READY].
    
    - When your client detects that it has disconnected, it should close the connection completely and open a new one [SEMI-READY]
    - (following the same strategy as Connecting / STEP 1) [READY] [READY]

    - resume_gateway_url Once the new connection has been opened, the client must send a Resume Gateway<Resume> [READY].
    - the client must send a Gateway resume<Resume> [READY].

    - If successful, the gateway will respond by replaying all the lost events in order [NOT READY]
    - ending with a resumed<Resumed> event to indicate that playback is complete and all subsequent events are new [NOT READY].

    - In which case the client will receive an invalid opcode 9 session and is expected to wait a random amount of time, between 1 and 5 seconds, and then send a new opcode 2 ID [NOT READY]. 

    - If not respected, it is resume_gateway_url possible that your client will be forced to reconnect after a short period of time. [NOT READY]

[Disconnections - INT]

    - If the gateway ever issues a disconnect to your client, it will provide a shutdown event code that you can use to properly handle the disconnect. A complete list of these shutdown codes can be found in the Response Codes documentation. [READY]

    - When you close the connection to the gateway with close code 1000 or 1001, your session will be invalidated and your bot will appear offline. If you simply close the TCP connection or use a different close code, the bot session will remain active and timeout after a few minutes. This may be useful for a reconnection, which will resume the previous session. [NOT READY]

[Tracking Status - INT]

    - Most of a client's status is provided during the ready<Ready> [READY] event.
    - Discord expects clients to locally cache as many relevant object states as possible and update them as gateway events are received. [READY]

[Advanced Fragmentation - INT]

    - Fragmentation formula (shard_id = (guild_id >> 22) % num_shards) [READY].

    - Note that num_shards does not relate to or limit the total number of potential sessions: it is only used to route traffic. As such, sessions do not have to be identified in an evenly distributed manner when fragmenting [READY]

    - [shard_id, num_shards]or sessions with different num_shardsvalues. This allows you to create sessions that will handle more or less traffic than others for tighter [READY] load balancing
    - orchestrate "zero downtime" scaling/upgrading by transferring traffic to a new implementation of sessions with a higher or lower num_shardscount that are prepared in parallel. [READY]

    [Maximum concurrency]

        - rate_limit_key = shard_id % max_concurrency [READY].
        - This puts your shards into "buckets" of max_concurrencysize. When you start your bot, you can start with max_concurrencyfragments at a time, and you must start them by "bucket" in order. [READY]

Ideal solution or implementation

The ideal solution is basically planned and implemented.

it is necessary to add some types, better comment the code and allow advanced customizations to @biscuitland/ws
technical tests performed on the @biscuitland/ws library conclude a negligible use of resources.

Tested on a bot with 250,000+ guilds and more than 200 shards the constant consumption has been 120mb / 250mb and the CPU usage has remained below 2% at all times.

The @biscuitland/ws does not hold any cache currently. And it will be projected to go through @biscuitland/cache for the use of the platforms.

  • @biscuitland/ws has been tested and is functional.
  • @biscuitland/ws is tested in heavy event usage

Alternative solutions or implementations

No response

Other context

No response

THIS LIBRARY RUINED MY LIFE

Which package is this bug report for?

core

Issue description

THIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFE

Code sample

THIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFE

Package version

THIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFE

Node.js version

THIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFE

Operating system

THIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFE

Priority this issue should have

High (immediate attention needed)

Which gateway intents are you subscribing to?

GuildIntegrations

I have tested this issue on a development release

THIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFETHIS LIBRARY RUINED MY LIFE

create and test @biscuitland/cache

Due to the limits imposed by discord to safeguard its infrastructure, a modern cache system is necessary.

The package must be built with the objective of providing a data abstraction where information can be read and written.

  • @biscuitland/cache must be abstract and highly customizable.
  • @biscuitland/cache should provide methods to know its current state
  • @biscuitland/cache like all biscuit packages, is an adapter and can be easily modified.
  • @biscuitland/cache it should be global with a style centered on <K, V> (key and value) and be easily mutable in its data (and depending on the case it should support updates, cascading deletions)

Bot is not running

Hey everyone, I want to run this example with bun but it didn't work, why?

code

import { ChatInputApplicationCommandBuilder, Session } from "@biscuitland/core";
import { GatewayIntents } from "@biscuitland/api-types";

const session = new Session({
  token: "TOKEN",
  intents: GatewayIntents.Guilds,
});

const commands = [
  new ChatInputApplicationCommandBuilder()
    .setName("ping")
    .setDescription("Replys with pong!")
    .toJSON(),
];

session.events.on("ready", async ({ user }) => {
  console.log("Logged in as:", user.username);
  await session.upsertApplicationCommands(commands, "GUILD_ID");
});

session.events.on("interactionCreate", (interaction) => {
  if (interaction.isCommand()) {
    if (interaction.commandName === "ping") {
      interaction.respond({ with: { content: "pong!" } });
    }
  }
});

session.start();

output:

Screenshot 2022-07-31 195957

Can't find variable: `require`

When I try to use the discord bun example and then run it this message appeared

Screenshot 2022-07-14 102533

Error: ReferenceError: Can't find variable: require.

Biscuit Version: 0.1.0

mushrum to @biscuitland/voice

In terms of realization and ease. It has been decided to remove the mushrum repository, to be included within biscuitland.

The goal is to provide an easy and simple to configure voice client (inspired by Erela.js) and adapted to the audio platform (and alternative to lavalink) mushroom.

  • @biscuitland/voice should provide an adapter just like all biscuitland packages.
  • @biscuitland/voice should add more properties and methods besides removing the send interpreter, to be compatible with biscuit only.
  • @biscuitland/voice should implement the operatorPlayer and operatorSpace methods to allow changes, edits and deletes.

Fix (most) linter warnings

Which package is the feature request for?

core

Feature

I want to fix lint errors for:

  • consistent-type-imports
  • no-duplicate-imports
  • curly
  • array-type
  • no-mixed-spaces-and-tabs
  • no-extra-semi
  • no-undef

The other errors are de minimus

Ideal solution or implementation

image

Alternative solutions or implementations

No response

Other context

No response

SyntaxError: Importing binding name 'GatewayIntents' is not found.

Hi again, I tried the new version of biscuit with the new version of bun v0.1.5, it's shows this error

Screenshot 2022-07-30 210033

code

import { Session, GatewayIntents } from "@biscuitland/core";

const intents =
  GatewayIntents.MessageContent |
  GatewayIntents.Guilds |
  GatewayIntents.GuildMessages;
const session = new Session({ token: "your token", intents });

session.events.on("ready", ({ user }) => {
  console.log("Logged in as:", user.username);
});

session.events.on("messageCreate", (message) => {
  if (message.content.startsWith("!ping")) {
    message.reply({ content: "pong!" });
  }
});

session.start();

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.