Edgelord is a library for Cloudflare Workers. You can scaffold a basic bot for discord, slack, etc.

Overview

Edge Computing + chūnibyō = Edgelord 👿

Edgelord

Edgelord is now working. You can contribute for it.

Edgelord is a Rust library for cloudflare workers. You can use Edgelord to scaffold a basic bot for social networking service.

Edgelord supports previous bot:

  • 🚧 discord -> edgecord
  • 🚧 slack

Since Edgelord is a Light Wrapper for cloudflare workers, you can use as a foundation to build a bot on.

Features

  • 🚧 discord bot support
  • 🚧 slack bot support
  • 🚧 Documentation

🚧 Edgecord - Discord http interaction bot handler

edgecord is a fast, light weight, powerful discord http interaction bot framework. It provides type safely commands, automatically publish system.

Example

use edgecord::{
    command, ChatInputCommandContext, InteractionHandler, InteractionResponse,
};
use worker::*;

#[event(fetch)]
pub async fn fetch(req: Request, env: Env, worker_context: worker::Context) -> Result<Response> {
    edgelord::set_panic_hook();

    let router = Router::with_data(worker_context);

    router
        .post_async("/", |req, ctx| async move {
            let RouteContext { env, data, .. } = ctx;
            let handler = InteractionHandler::builder()
                .command(help_command())
                .public_key(&*env.secret("APPLICATION_PUBLIC_KEY")?.to_string())
                .application_id(&*env.secret("APPLICATION_ID")?.to_string())
                .token(&*env.secret("DISCORD_BOT_TOKEN")?.to_string())
                .build()
                .unwrap();
            handler.process(req, env, data).await
        })
        .run(req, env)
        .await
}

#[command(
    name = "help",
    description = "help command.",
)]
pub async fn help_command(ctx: ChatInputCommandContext) -> InteractionResponse {
    ctx.message("this is what you want")
}

Contribution

You can create issue or PR to contribute.

I want to you to contribute 💪

🚧 Documentation

now working

You might also like...
Rewrite of the Discord Bot used for Managing the Infinity Bot List Servers.
Rewrite of the Discord Bot used for Managing the Infinity Bot List Servers.

Arcadia Rewrite of the Discord Bot used for Managing the Infinity Bot List Servers. Contributing Always run fmt.sh before making a Pull Request! MacOS

A discord bot that safely executes whatever rust you throw at it. Remote code execution as a service
A discord bot that safely executes whatever rust you throw at it. Remote code execution as a service

RustBot Bot is still under development and not ready for production use RustBot is a discord bot that executes whatever rust code you throw at it. In

Powerfull Discord Raid Bot written in Rust, use VPN / Proxy because creating 200 channels in 10s Will ratelimit you.

Harakiri-Rust This the first Discord Raid Bot made in RustLang I recommend you use with a VPN or a Proxy to evade Discord Ratelimit. If bot doesn't st

CFD is a tool that allows you to check one or more domains to see if they are protected by CloudFlare or not.
CFD is a tool that allows you to check one or more domains to see if they are protected by CloudFlare or not.

CFD is a tool that allows you to check one or more domains to see if they are protected by CloudFlare or not. The check is carried out based on five criteria: 3 headers in the HTTP response, IP, and SSL certificate issuer. The check result can be displayed on the screen or saved to a file.

Temp repo to document problems with workers-rs

This is a temporarily repo to share some worker-rs code that is giving me problems. See also: https://github.com/cloudflare/workers-rs/issues/94 Versi

A simple bot for discord.

Rusky Um simples bot para o discord! 🚀 Executando ⚠️ Antes de tudo você precisa do Rust Instalado você pode instalar clicando aqui Preparando Primeir

A Discord bot for lichess and Rosen related things
A Discord bot for lichess and Rosen related things

liro Liro is a Discord bot that follows in the footsteps of Lichess-discord-bot, without necessarily aiming to replace it. The main pain point that th

Hi I'm Sophy, a discord bot in devlopment, soon I'll be available to help everyone (❁´◡`❁)

Sophy Bot Hi I'm Sophy, a discord bot in devlopment, soon I'll be available to help everyone (❁´◡`❁) Contribution Do you like me and want to help me?

A Discord bot for sending GeoGuessr challenge links that uses the GeoGuessr API written in rust.

GeoGuessr-bot-rs This is a simple implementation of a discord bot that send GeoGuessr-challenge links on demand. Features: Slash-commands Lightning-fa

Comments
  • 🚧Command Framework

    🚧Command Framework

    Structure

    
    fn descriptions() -> HashMap<&'static str, String> {
        HashMap::from([
            ("ja", "ヘルプコマンド".to_string())
        ])
    }
    
    #[command(name = "help")]
    #[command(description = "help command")]
    #[command(i18n_descriptions = descriptions)]
    async fn help_command(ctx: &Context) -> Result<Response> {
        ctx.send_message("This is help message.")
    }
    
    

    Tasks

    • [x] macros
      • [x] name
      • [x] description
      • [x] i18n
      • [x] guild_id
      • [x] permission
      • [x] option type converter
      • [x] option choices
      • [x] option parameters
      • [x] subcommand
    • [x] interaction handler
    • [ ] command validator
    • [ ] document
    edgecord ✨feature 
    opened by sizumita 1
Owner
null
Verify Discord interactions on Cloudflare Workers with Twilight

twilight-cloudflare-workers Verify Discord interactions on Cloudflare Workers with Twilight. API The primary function in the API is process. It takes

Zeyla 5 Jun 6, 2022
A pure-Rust serverless discord chatbot hosted on Cloudflare Workers.

About A pure-Rust serverless discord chatbot hosted on Cloudflare Workers. With a free account you have up to 100k requests per day. For storing state

Mike Dallas 31 Nov 21, 2022
Telegram Bot Template with Cloudflare Workers

cf-workers-telegram-bot-template Usage This template starts you off with a src/lib.rs file, acting as an entrypoint for requests hitting your Worker.

Lee Taehoon 2 Sep 23, 2021
A template for kick starting a Cloudflare worker project using workers-rs.

Getting Started A template for kick starting a Cloudflare worker project using workers-rs. This template is designed for compiling Rust to WebAssembly

Abid Omar 1 Oct 13, 2021
Blueboat is an open-source alternative to Cloudflare Workers. The monolithic engine for serverless web apps.

Blueboat Blueboat is an open-source alternative to Cloudflare Workers. Blueboat aims to be a developer-friendly, multi-tenant platform for serverless

Heyang Zhou 1.8k Jan 9, 2023
Log your spending in seconds with short text snippets. Powered by Rust, Cloudflare Workers and Svelte.

FastSpend Log your daily spending lightning fast with short text snippets! FastSpend is a tool to log your spending in seconds, powered by a lightning

Phoomparin Mano 24 Sep 13, 2022
Slack bot for self-servicing automation of common or predictable tasks.

receptionist-bot-rs Slack bot for self-servicing automation of common or predictable tasks. Receptionist bot aims to provide a no-code frontend for te

Twilio Labs 16 Dec 23, 2022
A Robo Lawyer Slack bot, powered by ChatGPT

Robo Lawyer for your slack channel, powered by ChatGPT Deploy this function on flows.network, and you will get a Slack bot that uses ChatGPT to respon

flows.network 6 Mar 26, 2023
A Discord bot focused on addressing the inherent problems with Discord, to allow a more socialist/anarchist organization of servers.

ACABot A Discord bot focused on addressing the inherent problems with Discord, to allow a more socialist/anarchist organization of servers (or "guilds

null 4 May 3, 2022
A rust(serenity) based discord bot for the hacksquad discord server

A Discord Bot for Hacksquad How to Deploy? Requirements Docker Docker Compose Steps To Run Copy the docker-compose.yml and .env.example files to your

HackSquad 5 Jan 4, 2023