TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Building a Discord bot in Rust

81 pointsby dohguyover 2 years ago

6 comments

Luker88over 2 years ago
I did a small discord bot 4-5 months ago with serenity, and while it worked, I found it was a mess.<p>It felt like someone was trying to force functional programming on rust, with typenames from java.<p>Sure it works but the code looked very verbose, and the ridiculous types like &#x27;ApplicationCommandInteractionDataOptionValue&#x27; definitely did not help.<p>Serenity works well, it&#x27;s just definitely not rust-style.
评论 #33023693 未加载
评论 #33022521 未加载
评论 #33022175 未加载
dohguyover 2 years ago
shuttle has released support for Serenity (a Rust library for the Discord API) a while back and now we have a tutorial ready for anyone willing to give it a go: <a href="https:&#x2F;&#x2F;www.shuttle.rs&#x2F;blog&#x2F;2022&#x2F;09&#x2F;14&#x2F;serentity-discord-bot" rel="nofollow">https:&#x2F;&#x2F;www.shuttle.rs&#x2F;blog&#x2F;2022&#x2F;09&#x2F;14&#x2F;serentity-discord-bot</a> (creating a simple Discord bot, extending it to a weather forecast bot and deploying it with shuttle, for free).<p>To give you some context on shuttle; it is a Rust-native cloud development platform (open-source) that allows you to deploy your Rust app (or Discord bot, in this case) by adding a single annotation to your main file. Once you do that, you can run `cargo shuttle deploy` and your app&#x2F;bot is all set!
评论 #33026701 未加载
socialismisokover 2 years ago
One thing that would help me have confidence in shuttle would be pricing somewhere between the $0 and &quot;ask us&quot; tiers. Something to consider after exiting your alpha.<p>I suppose that&#x27;s what the &quot;host for yourself on AWS&quot; approach is for, it would be great to see some docs written for that too!<p>This is neat. I&#x27;m a huge fan of serverless as a backend. I happen to enjoy writing JavaScript, so my needs are fairly well meet, but I&#x27;m increasingly using rust for side projects so I&#x27;m glad to see someone taking the time to make it easy to use and deploy in a serverless environment.
评论 #33022047 未加载
thdespouover 2 years ago
Please. Don&#x27;t use Rust other than systems programming. Just use Go or Python for anything else.
surrTurrover 2 years ago
How does the performance of shuttle compare to self-hosting on e.g. AWS?
评论 #33021977 未加载
surrTurrover 2 years ago
Does shuttle support something like Redis for caching?
评论 #33022086 未加载