A discord bot, made with Dart, which lets you run your own pure Dart code snippets directly via a discord ping, and get the output in an instant.

Overview

Dart Runner Bot

A discord bot, made with Dart, which lets you run your own pure Dart code snippets directly via a discord ping, and get the output in an instant.

Want to share the output of your Dart code, or explain a snippet of code to someone with a realtime execution, or just have fun with print statements? The Dart Runner Bot is here to the rescue.

This is the first ever Discord bot that lets you execute your Dart code and get the output seamlessly.

Clone this repository and head to the `Steps to Follow section` to get started.

🌟 Features

  • Run Dart Code instantly
  • Well-formatted output w/ Error line hinting
  • Dedicated help sections for commands
  • more features on the way...

πŸ“± Screenshots

  • Help Section

    Help Section Screenshot
  • Command Specific Help

    Command Specific Help Screenshot
  • Successful Code Execution

    Successful Code Execution Screenshot
  • Compile Time Error Output

    Compile Time Error Output Screenshot
  • Run-Time Error Output

    Run-Time Error Output Screenshot

❓ How to Use

Pre-requisites

  • Dart SDK is installed and added to PATH

    OR

  • Docker is installed

Steps to Follow

  • Create an Application, add a bot, and then get the BOT TOKEN from your Discord Developer Account

  • Create a .env file in the project root directory with these two values

    TOKEN=<your-discord-bot-token>
    PREFIX=dart! <<<replace it with your preferred command prefix, remove this tag>
  • If you don't have Docker on your system

    • Get the dependencies, in your terminal, execute -
      dart pub get
      
    • That's it, now you can run the bot -
      dart ./bin/dart_runner_bot.dart
  • With Docker (if available)

    • Build the Docker Image from the Dockerfile present in the repo -

      docker build -t dart-runner-bot .
      
    • That's it, run the docker image with the environment variables you made -

      docker run --env-file .env  dart-runner-bot
      

🀝 Contributing

Contributions are always welcome!

See the Contribution Guide for ways to get started.

πŸ“– Lessons Learned

Dart Runner Bot has been a really exciting and grasping project for me. This was my first attempt at creating a Discord. And starting out with a programming language (Dart) that has close to no discord bot creation tutorials, was definitely not the best idea.

But I did somehow manage to make this bot amazing (in my opinion at least)

I was driven by a friend's (also member of the concerned Discord server) request to add this bot to the server.

I learnt many things along the way, the most notable ones are mentioned below -

  • Nyxx Library
  • Dart Processes
  • Docker Containers
  • Dart Isolates
  • Discord API
  • and so much more...

πŸ’‘ Authors

πŸ™‡ Acknowledgements

I thank @yahu1031 for helping me with the development of this bot, and for making his Flutter Bot source code publicly available.

Some chunks of really useful code have been taken from that repo. The source code of Dart-Runner-Bot will soon be merged to that project.

πŸ“ License

Copyright Β© 2022-present, Anikate De

This project is licensed under Apache License 2.0

You might also like...

Tooling and libraries for processing dart test output into dev-friendly formats

better_test_reporter Introduction This is an application/library heavily inspired by dart-junitreport and dart-testreport. It takes what was done in t

Sep 14, 2022

About This is Personal Expenses Planner. You can add your expenses in to the app and manage your transaction. and you can see How much did you spend on which day. I developed this project using flutter.

expense_planner A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Jul 6, 2022

An instant messaging app built using Flutter and Firebase

An instant messaging app built using Flutter and Firebase

Flutter Chat A messaging app built using Flutter and Firebase with authentication and Firestore. This app is based off the Flash Chat app from LondonA

Oct 30, 2021

Run asynchronous code before building your widget

Loader Sometimes you need to load some data before building your widget. Because initState doesn't support asynchronous loading you need to find anoth

Apr 17, 2022

Compact representation of a placeholder for an image. Encode a blurry image under 30 caracters for instant display like used by Medium. Maintainer: @Solido

Compact representation of a placeholder for an image. Encode a blurry image under 30 caracters for instant display like used by Medium. Maintainer: @Solido

Flutter BlurHash Compact representation of a placeholder for an image. Generation You can use https://blurha.sh/ for testing or use any official api o

Sep 15, 2022

Plaso Connect is an application which acts as a one-stop solution where the people requiring blood plasma/oxygen can directly find and contact the donors and healthcare units as per their requirements

Plaso Connect is an application which acts as a one-stop solution where the people requiring blood plasma/oxygen can directly find and contact the donors and healthcare units as per their requirements

PLASO CONNECT - The Lifeline A one-stop platform for COVID relief resources -- Connecting patients with Plasma donors and oxygen suppliers. Built for

Jun 5, 2022

A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully & easily modifiable.

A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully & easily modifiable.

A package that lets you include a cool, nice looking and validated Password TextFormField in your app to enhance user experience. The package is fully

Jun 7, 2022

Android app that converts an URL to markdown, and lets you share it to your favorite notes app.

Android app that converts an URL to markdown, and lets you share it to your favorite notes app.

markdownr Android app that converts an URL to markdown, and lets you share it to your favorite notes app. I've written this app to save articles I fou

Aug 20, 2022

QR.Flutter is a Flutter library for simple and fast QR code rendering via a Widget or custom painter.

QR.Flutter is a Flutter library for simple and fast QR code rendering via a Widget or custom painter.

QR.Flutter is a Flutter library for simple and fast QR code rendering via a Widget or custom painter. Need help? Please do not submit an issue for a "

Sep 28, 2022
Comments
  • create simple ping server

    create simple ping server

    Started an HTTP server that listens to a simple GET request corresponding to ping functionality, to ensure that the bot maintains active/up time in selected Hosting providers.

    The URL can now be pinged using any auto-pinger bot service at regular intervals to do so.

    opened by Anikate-De 0
  • EmbedBuilderArgumentException: Embed description is too long (2048 characters limit)

    EmbedBuilderArgumentException: Embed description is too long (2048 characters limit)

    When the bot user tries to run code which might have an output that exceeds 2048 characters, the bot fails to responds, breaking UX flow

    The following error shows up in the bot Logs -

    [EmbedBuilderArgumentException: Embed description is too long (2048 characters limit)]. Stacktrace: EmbedBuilder.build (package:nyxx/src/utils/builders/embed_builder.dart:104:7) MessageBuilder.build (package:nyxx/src/utils/builders/message_builder.dart:176:65) ComponentMessageBuilder.build (package:nyxx_interactions/src/builders/component_builder.dart:252:18) HttpEndpoints.sendMessage (package:nyxx/src/internal/http_endpoints.dart:1177:25) CacheableTextChannel.sendMessage (package:nyxx/src/core/channel/cacheable_text_channel.dart:52:80)

    bug 
    opened by Anikate-De 0
Owner
Anikate De
Anikate De
A web dashboard that allows you to monitor your Chia farm and sends notifications when blocks are found and new plots are completed through a discord bot. It can link multiple farmers/harvesters to your account.

farmr A web dashboard that allows you to monitor your Chia farm and sends notifications when blocks are found and new plots are completed through a di

Gil Nobrega 259 Sep 21, 2022
Simple "ping-pong" bot for Anonchat.

Anonchat pingbot A proof-of-concept "ping-pong" bot made for anonchat-v2. Setup The bot can be configured by changing some variables in bot.py, the na

Calamity 2 Feb 5, 2022
Dot-Net-Inverview-Bot - Dot net interview questions answering by bot built with flutter

Dot Net Interview question Answering Bot Dot net interview questions answering b

Maddi Mahesh 5 Feb 2, 2022
This pub lets you share any kind of files (csv, mp4, png etc), take screenshot of the widgets you want and return as Image and share them directly as well in the form of an image.

share_files_and_screenshot_widgets This pub lets you share any kind of files (csv, mp4, png etc), take screenshot of the widgets you want and return a

Jay Mehta 19 Sep 27, 2022
Ping command utility app made with Flutter

Pinger Ping command utility app made with Flutter. Used libraries, tools and services: (some) community packages: mobx freezed injectable fl_chart Fir

Tomasz WyrowiΕ„ski 91 Jul 8, 2022
This is a bot built with Dart lang which helps you people a simple task and have fun

TeleBot This is a bot built with Dart lang which helps you people a simple task and have fun Command supported /jokes - get a random joke ?? /insult -

Rexford Asamoah 9 Apr 17, 2022
BankGit helps you manage your account and transactions more efficiently by breaking your account into branches for various purposes and then making transactions directly from them.

Bank Git Web Hosted Here : https://bank-management-45848.web.app/ Bank Git is an application built with Flutter and Firebase to help you manage your b

Yash Johri 24 Aug 23, 2022
An open source encrypted peer-to-peer system. Own data, own privacy.

An open source encrypted peer-to-peer system. Own data, own privacy.

Cymple Tech 440 Sep 23, 2022
An open source encrypted peer-to-peer system. Own data, own privacy. (Rust+Flutter)

An open source encrypted peer-to-peer system. Own data, own privacy. (Rust+Flutter)

Cymple Tech 124 Oct 7, 2021
Encrypted peer-to-peer system for data security. Own data, own privacy

ESSE (Encrypted Symmetrical Session Engine) An open source encrypted peer-to-pee

CympleTech 440 Sep 23, 2022