Giter Site home page Giter Site logo

selfmadesystem / mydiscordbot Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 119 KB

A simple Discord bot written in TypeScript.

License: GNU Affero General Public License v3.0

TypeScript 100.00%
discord discord-js discord-bot discordjs discordjs-bot discordjsbot discord-js-bot type typescript typescript-discord-bot

mydiscordbot's Introduction

MyDiscordBot

A simple Discord bot written in TypeScript.

Getting Started

npm install installs the dependencies.

npm start starts the bot.

Before starting the bot, make a localconfig.json file in the src directory with the following contents:

{
    "token": "YOUR_TOKEN_HERE",
    "guildId": "YOUR_GUILD_ID_HERE",
    "clientId": "BOT_ID_HERE",
    "publicKey": "YOUR_PUBLIC_KEY_HERE",
}

Run npm run depcmd to deploy the bot's commands to the server.

mydiscordbot's People

Contributors

selfmadesystem avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

mydiscordbot's Issues

Message Utils

Message utils

Message utils is a collection of functions and classes that help you to create and send messages.

MessageBuilder

MessageBuilder is a class that helps you build messages.
It has a fluent interface and can be used to create easily complex messages.
It is used by MessageSender.

MessageSender

MessageSender is a class that helps you to send messages.


What these should roughly look like:

interface MessageBuilder {
    setContent(content: string): MessageBuilder;
    setTTS(tts: boolean): MessageBuilder;
    setAllowMentions(allowMentions: boolean): MessageBuilder;
    addEmbed(embed: MessageEmbed): MessageBuilder;
    addAttachment(attachment: MessageAttachment): MessageBuilder;
    addAction(action: MessageActionRow): MessageBuilder;
    setEphemeral(ephemeral: boolean): MessageBuilder; // Use only from MessageSender.replyEphemeral
}

interface MessageSender {
    send(channel: TextBasedChannel, message: MessageBuilder): Promise<Message>;
    reply(replyTo: Snowflake | MessageInteraction, message: MessageBuilder): Promise<Message>;
    replyEphemeral(interaction: MessageInteraction, message: MessageBuilder): Promise<Message>;
}

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.