💾 Archived View for midnight.pub › posts › 1133 captured on 2023-09-08 at 18:08:53. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Midnight Pub

Oh god, Python! ...I mean the programming language.

~impulse

So funny story, a couple days ago I was sitting down in class, we were allowed to use our phones for the moment, and I was chatting on a particular Discord server.

Now I know, Discord is kind of terrible, but it would be too much of a hassle to get all my friends to move over to Matrix. That, plus the servers we've created have a lot of history we would rather not lose.

But this particular server was one I frequent quite a bit, it was the "Minecraft Computer Mods" Discord. It's a server for these Minecraft mods that add computers to the game, typically programmed with Lua.

Yeah, I'm THAT kind of nerd. But to be fair, if it wasn't for discovering this, I would still be fiddling with my TI-83+.

Anyway, I got this Discord bot that I haven't touched in a while. Why? Because the code is terrible and I don't know Node.js (or even just JavaScript) for the life of me.

I was chatting, saying "Damn, I wish I could program a Discord bot in Lua, that would make my life a lot easier."

Then, I was introduced to Luvit.io, which is like Node.js, but for Lua! Then I was introduced to Discordia, which is a Discord library made for it.

I was ecstatic at first, finally, a library I can actually use easily! I manage to set up a small little Discord bot with it, and everything is going well, except there is a slight problem.

No slash commands.

The library seemed a bit outdated, to say the least.

I made an offhand comment in the Discord, until another user named Sky that frequents the server often as well, informed me that Discordia was TERRIBLE, just all around. Not only is it outdated, but it isn't asynchronous, so when multiple people start trying to use it, it will slow down like HELL.

Sky then introduced me to discord.py, like the Python shill he is.

I should probably explain, I have a deep-seeded hate for Python, but I don't even remember why at this point. I only remember a lot of headaches, but those are constant.

And since Python's syntax is similar enough to Lua's, looks like I don't got much of a choice. I'm learning Python again.

Wish me luck.

Write a reply

Replies

~tetris wrote:

No slash commands.

Check how the API is implemented in the library. Maybe it's just a bunch of POST requests, which you could extend/manipulate to inject/force slash commands

~contrarian wrote (thread):

Have you ever tried a Discord bridge?

~inquiry wrote (thread):

My wanting to rant a bit about the Tower of Babel of programming languages received a steam-releasing chuckle infusion when I chanced upon this:

https://babeljs.io/

I mean, of *course* it has to do with Javascript. Of *course*.

But, anyway, so happy to finally see the word "Lua" in someone else's posts. That made me so happy I nearly flung open the front door to scream an ecstatic "SOMEONE ELSE MENTIONED LUA!!! SOMEONE ELSE MENTIONED LUA!!!" to the neighborhood.

Can't say I ever hated Python, but I *was* surprised how prevalent it became way back when. And, of course, every time I see a job listing I mostly like, it requires Python expertise that I'll likely never have. Yes, could easily learn it, but can't lie my way into a job requiring expertise, and will likely never have expertise therein without learning it being a matter of living/employment.