GithubHelp home page GithubHelp logo

stuyy / katana Goto Github PK

View Code? Open in Web Editor NEW
77.0 4.0 14.0 97 KB

Deno Discord API primarily based on Discord.JS ▬▬ι═══════ﺤ

License: MIT License

TypeScript 100.00%
deno discord denodiscord discordapi discordbot bots katana

katana's Introduction

What is Katana?

Katana is an unofficial Discord library that allows you to build Discord Bots with the Deno runtime.

build issues pr stars forks

Usage

import { Client, MessageEmbed } from 'https://deno.land/x/katana/mod.ts'

const client = new Client();

client.on('ready', () => {
  console.log('Bot has logged in!');
});

client.on('message', (message) => {

  if (message.content === 'hello') {
    message.channel.send('Hello World!');
  } else if (message.content === 'embed') {
    const embed = new MessageEmbed()
      .setDescription('hello world')
      .setColor(13198335)
      .setTitle('This is an embed');
    message.channel.send(embed);
  }
});

client.login('token');

Features

  • Caching
  • Message Collectors
  • Message Embeds
  • Supports most Message Endpoints (Create, Delete, Edit, Fetch)
  • Very similar to Discord.JS

In Progress

  • Reaction Collectors
  • Await Message
  • Await Reaction

Future Features

  • Optional In-Memory Caching
  • Optional Redis Caching
  • Sharding
  • Voice Support
  • Commands Framework

Contributing

Contributions are appreciated. You can fork this repository and make a pull request and I'll review it. Feel free to join my Discord server: http://discord.gg/anson

katana's People

Contributors

stuyy 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

Watchers

 avatar  avatar  avatar  avatar

katana's Issues

Publish Katana on nest.land

Nest.land is a growing ecosystem of Deno modules. It is a blockchain based package-registry, meaning that any pushed module will stay online, and no one will be able to remove it. This is especially useful and important regarding the url-based imports in Deno and most importantly, security.
Even though Nest.land is in beta, it is really powerful and also faster than the github servers (deno.land/x) just rewrites the module url to raw.githubusercontent.com.
I think it would be great to have Katana on Nest.land, since not changing the functions of a library (via updates, because the bot might go useless) is essential for bot developers.

More information is available on https://nest.land/docs

embed error

error: TS2740 [ERROR]: Type '{ title: string; }' is missing the following properties from type 'MessageEmbed': getTitle, setTitle, getType, setType, and 20 more.
embed: { title: 'hello' }

Issue with bot that's in a lot of servers.

My bot is in 44 servers and it serves around 16k members.

Here is the error:

Download https://deno.land/x/katana/src/handlers/PRESENCE_UPDATE.ts
Download https://deno.land/x/katana/src/handlers/PRESENCE_UPDATE.ts
Download https://deno.land/x/katana/src/handlers/PRESENCE_UPDATE.ts
Download https://deno.land/x/katana/src/handlers/PRESENCE_UPDATE.ts
error: Uncaught TypeError: members is not iterable
  for (const member of members) {
                       ^
    at resolveGuildMembersAndUsers (https://deno.land/x/katana/src/utils/resolvers.ts:110:24)
    at default (https://deno.land/x/katana/src/handlers/READY.ts:40:23)

Future of Katana?

What is the future plans for katana development it's been 5 months you did not release new updates we will love to see new updates.

How would I do some thing like this in java.

I have been trying to do something similar in java but I can not parse the json of the discord web socket and I don't think i am even doing it right. Do you have any suggestion were I can find something to help me.

Thx
Yusuf

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.