Skip to content

Instantly share code, notes, and snippets.

View Fortex365's full-sized avatar
🇨🇿

Fortex Fortex365

🇨🇿
View GitHub Profile
@adamsbytes
adamsbytes / python-discord-events.md
Created December 28, 2021 22:44
Retrieving and creating Discord events with Python

Interacting with the Discord Events API using Python

As of writing this, documentation for the Discord events API is a little lacking and the feature is not yet integrated into Discord.py.

The Basics

This gist presents a basic class that performs a couple event actions against the Discord API.

To interact with the Discord API you need an async http client, for this gist it'll be aiohttp. You'll need a Discord bot created, and to have a token generated for that bot. Your bot will also need event permissions in the guilds/servers you are trying to create events in.

@jkoplo
jkoplo / MQTTNet to AWS IoT - Framework.cs
Created April 27, 2021 23:37
MQTTNet to AWS IoT - Framework
using MQTTnet;
using MQTTnet.Client.Options;
using OpenSSL.X509Certificate2Provider;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.Net.Security;
using System.Text;
@jkoplo
jkoplo / MQTTNet to AWS IoT - Core.cs
Last active February 3, 2025 18:06
MQTTNet to AWS IoT - Core
using MQTTnet;
using MQTTnet.Client.Options;
using Oocx.ReadX509CertificateFromPem;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.Net.Security;
using System.Text;