NEW RELEASE! v4.0.0.0
Hey there,
Today we upgrade our system from using the fetch() method to using websockets. All every-tick events, such as load-data-from-authserver or the fetch-messages event, no longer have to be executed or can be replaced by on-start-of-layout.
We update our servers to the latest systems today at 20:00pm UTC+1.
If you use features like "Discord OAuth" or "Fetching messages", please update your game to get there!
Because this is a new system, we encourage anyone who finds a bug to report it on our discord server!
DOCS:
Version
This documentation is for version v4.0.0+! Older versions than that are no longer supported! Please update your project if you haven't already.
Overview
We will cover the following topics in this documentation: ➜ Sending messages using webhooks ➜ Fetching messages ➜ Direct messages ➜ OAuth2
Webhooks • Sending messages
In this episode we will coder the Advanced Webhook section. TEXT-MESSAGES
Usage:
DiscordAPI ➜ Post webhook message with Name: "John", Avatar: https://yourimage.com/1ASD41n12, URL: YOUR WEBHOOK URL and params: [ "Hello world!" ]
URL: A so-called "webhook URL" is always required to send messages (direct messages excluded). You could find them under the following path: Discord ➜ Server Settings ➜ Integrations ➜ Webhooks ➜ New webhook
Webhook-Name: You can give your webhook a different name than what you set when creating the webhook. If you don't want this, you can leave the field empty!
Webhook-Avatar: The same principle is followed here as just mentioned. Please make sure you don't use "blob" URLs!
Text: Enter your messages here!
Message-ID: Enter the ID of the message you want to edit here! Please note that webhooks can only process messages sent from the same webhook url! EMBED-MESSAGES
Title: Enter the title of the embed!
Description: The description is a longer text in the middle of the embed.
Color: RGB-formatted color codes.
Image-URL: URL of the large image displayed on the bottom of the embed.
Author: Enter a text that gets displayed at the top of the embed. (Similar to title but smaller!)
Author-Icon: Tiny image on the left of the author.
Thumbnail: Just like the {image} property but smaller and on the top-right.
Footer: Short description on the bottom of the embed.
Footer-Icon: Tiny little image on the left of the main footer.
Timestamp: Timestamp with current time and date!
Fetching Messages
Usage:
DiscordAPI ➜ Listen for Messages from guild SECRET TOKEN
After you invited our Bot to your server enter these commands:
- ➜ c3!generatetoken
- ➜ c3!viewtoken
Guild-ID: Paste the token you get from there in here!
NOTE: Use the On-Message-Fetched condition to test if a message is fetched! Also make sure to only start listening once per guild!
Direct Messaging
Usage:
DiscordAPI ➜ Send 1234567890 message "Hello world!" in guild SECRET TOKEN
User-ID: Enter the User ID of the user you want to send the message to!
Content: The main Content of the message! (Works like Webhook messages and webhook-embed fields!)
OAuth2
Usage:
DiscordAPI ➜ Request Auth
[PROP] Server-ID: If you wish to get a list of all roles that the user has on a certain server, enter the ID of the server whose roles you want to fetch here.
Get DiscordAPI for Construct 3/2
DiscordAPI for Construct 3/2
Status | In development |
Category | Tool |
Author | Huskycraft |
Tags | Construct 2, construct-3, discord, oauth2, webhooks |
More posts
- NEW RELEASE! v7.4.0.0Sep 02, 2023
- NEW RELEASE! v7.3.1.2Jul 09, 2023
- NEW RELEASE! v7.3.0.2Jun 05, 2023
- NEW RELEASE! v7.3.0.0May 30, 2023
- NEW MAJOR RELEASE! v7.2.0.1Apr 23, 2023
- NEW RELEASE! v7.0Aug 18, 2022
- NEW RELEASE! v6.0.0.0Jul 28, 2022
- NEW RELEASE! v5.1.0.0Jul 10, 2022
- NEW RELEASE! v3.4.0.0!Apr 30, 2022
Leave a comment
Log in with itch.io to leave a comment.