Giter Site home page Giter Site logo

mirabellierr / bun-discord-bot Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 0.0 38 KB

An interaction Discord bot written in JS and TS using Bun runtime environment. Contains simple get avatar and get user info commands. Starting a bot only takes 0.02 - 0.05 ms.

Shell 0.17% JavaScript 16.95% TypeScript 82.88%
bunjs discord-bot

bun-discord-bot's Introduction

kanna

Bun Discord Bot

An interaction Discord bot written in JS and TS using Bun runtime environment. Contains simple get avatar and get user info commands. Starting up the bot only takes 0.02-0.05 ms.

This bot is created with Bun runtime

Using Bun runtime. Please visit their website on how to setup Bun runtime.

Getting Started

Cloning the repo

git clone https://github.com/MiraBellierr/bun-discord-bot

Development

To run this locally, rename .env.example to .env and fill in the variables, then you can run bun run.js to start a local dev environment and use something like ngrok/cloudflare to tunnel it to a URL.

Using ngrok

A way to expose a localhost port to a URL is by using ngrok. download

First, download and install ngrok, then type ngrok http 1337 in a new terminal. This will create a https://*.ngrok.io URL.

To instruct discord to use your server for all user-created interactions, you must:

  • Go to to Discord Developers Portal Applications Page.
  • Select / Create a new application. On the application's page, fill the "Interactions endpoint URL" input with the https://*.ngrok.io/interactions url.
  • Invite your application to your server using this URL: https://discord.com/oauth2/authorize?client_id=[client-id]&scope=applications.commands
  • You're ready to go!

Be aware that the ngrok URL expires after 2 hours, you'll have to restart the ngrok command after this delay.

bun-discord-bot's People

Contributors

mirabellierr avatar

Stargazers

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

Watchers

 avatar

bun-discord-bot's Issues

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.