• 1 Post
  • 2 Comments
Joined 2Y ago
cake
Cake day: Apr 08, 2022

help-circle
rss

I’m thinking this website here will actually be better for noobs like me but will also help teach me more about what’s happening. https://autocode.com/guides/how-to-build-a-discord-bot/


Ah fuck I didn’t mean to post this from my bot account but here we are.


Where can I learn how to use the Lemmy api?
As the title says, I'm trying to create my own discord bot that takes channel comments and posts them on lemmy but I'm woefully underprepared. I definitely just need some more baseline info because as always I'm already in much deeper than I should be. Thanks for any help! I've already setup a bot (on the same server as lemmy, exactly how it's described in the linked doc) and can successfully ping it from my server. [I used this to set it up which uses Lua](https://github.com/SinisterRectus/Discordia/wiki/Writing-Your-First-Bot) and I'm unsure if that will be an issue. I can setup node.js if need be. I also installed the `lemmy-js-client`. I guess I have a few questions but really I'll take any help I can get :) - Does the js client need to be installed in a certain location? - Where does the block of text on the api docs go? Just in my `bot.lua` file? - websocket or http? Does it matter? - I need to make a POST request to lemmy to uyt the content there after I grab the comment from discord? - Can someone recommend me a resource so I can learn more about using [the API here](https://join-lemmy.org/api/#usage)? More than willing to do the legwork on my own but I'd like to know I'm going in the right track first. Additionally I was trying to use [pipedream](https://pipedream.com/) for assistance. I can optionally run code right on the site as shown in the picture below but also I can use any API account or make a POST request which are 2nd and 3rd photos below respectively. I'm taking a stab at the http POST workflow in between typing this. ![](https://fuckreddit.tryp.digital/pictrs/image/12769013-ffaf-4725-8e43-7c9cbbda5ea1.png) ![](https://fuckreddit.tryp.digital/pictrs/image/e4213bf7-894c-4316-89bf-3c6543e1cf9a.png) ![](https://fuckreddit.tryp.digital/pictrs/image/f811173a-4dab-4ad0-a101-12fc9815a97f.png)
fedilink