Skip to content

Instantly share code, notes, and snippets.

using Discord;
class Program
{
static void Main(string[] args) => new Program().Start();
public void Start()
{
var client = new DiscordClient();
client.MessageReceived += async (s, e) =>
let Discordie = require('discordie');
let Events = Discordie.Events;
let client = new Discordie();
client.connect({
token: 'my_app_token'
});
client.Dispatcher.on(Events.GATEWAY_READY, e => {
console.log(client.User.username + ' connected!');
const links = [];
const rpLinks = [
<div classname="header applicationsHeader">
Rich Presence
</div>
];
// First way
DocumentationPages.map(link => {
@msciotti
msciotti / rpc_connect.cs
Created March 16, 2018 22:15
Unity RPC Connection
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Runtime.InteropServices;
using System.Text;
using System;
using System.Threading.Tasks;
using System.Net.WebSockets;
using System.IO;
@msciotti
msciotti / Change Log.md
Last active September 12, 2018 21:58
Discord GameSDK Changelog - September 11, 2018

September 11, 2018 SDK Changelog

Hey everyone! Today marks another SDK drop with some great new stuff for you. We are so close to a release candidate; it should be coming in a couple days. We're finishing up the IAP and entitlements portion of the SDK as you read this, and it should be ready for you within one or two days.

This SDK drop is our big polish overhaul before the release candidate. There are a number of naming changes and some small functionality changes that we'll walk through here. The networking layer also got some juice and is now routing W O R L D W I D E. That means no more 200 ms ping time; it'll be lightnin' fast.

Here's everything that's changed:

@msciotti
msciotti / Intro.md
Created October 16, 2018 01:36
Intro.md

Introduction

You’ve found the Discord Developer Documentation! These pages are dedicated to showing you all the ways that you can use Discord to make cool stuff. Whether you’re looking to create awesome bots for your community, empower your applications with our API, or hook us right into your game with Rich Presence or the GameSDK, Discord has something for you.

All of our documentation is on GitHub and we <3 corrections and improvements!

Getting Help

If you believe you're experiencing a bug with our API or want to report incorrect documentation, open an issue on our issue tracker.

@msciotti
msciotti / GameBridge to GameSDK.md
Last active November 15, 2018 21:17
Migrating from GameBridge to GameSDK

Intro

If you're reading this, woo! You've got access to Discord's new GameSDK. It does a lot of fancy stuff, which you can see over here. But, most importantly, it handles voice and text chat in a way that's much easier than GameBridge.

What Was GameBridge

So, how did GameBridge work? You had to:

  1. Integrate the SDK
  2. Manage all your own RPC connections, commands, events, etc.

Introducing Teams!

Hey everyone! Today we are releasing an awesome new feature for devs on Discord: Teams! Teams will let you easily work together and manage applications as a...team...it sounded cooler than "organizations", alright?

What are Teams

Teams are groups of users, managed through the Developer Portal. Teams have members and own applications. Users who are members of a team can manage applications that team owns as if they were their own. No more sharing login credentials, or making shared accounts that multiple people can access. Now you can manage applications with multiple users securely.

Security

Getting Ready for Discord

If you're reading this, it means that you're ready to prepare your game for the Discord store. And we can't wait to have you! You want to know what you need to do to prepare, and we're here to tell you what those things are.

If you're unsure about any of these requirements or want further clarification, feel free to reach out to us with questions.

Read the Documentation

We have a lot of really great documentation around the Discord store and what we have to offer in terms of technical solutions and integrations, and I'm not just saying that because I wrote them. Read through the docs and decide what pieces may be helpful for your game. Here's some starting points:

========== OUTPUTTING STACK TRACE ==================
0x00007FFE343AA388 (KERNELBASE) RaiseException
0x00007FFDFAA51158 (mono) [c:\buildslave\mono\build\eglib\src\goutput.c:201] g_logv
0x00007FFDFAA5117C (mono) [c:\buildslave\mono\build\eglib\src\goutput.c:211] g_log
0x00007FFDFAAAE9E3 (mono) [c:\buildslave\mono\build\mono\metadata\marshal.c:1943] emit_struct_conv_full
0x00007FFDFAAAA6E4 (mono) [c:\buildslave\mono\build\mono\metadata\marshal.c:5823] emit_marshal_vtype
0x00007FFDFAAACDB6 (mono) [c:\buildslave\mono\build\mono\metadata\marshal.c:7806] emit_marshal
0x00007FFDFAAAD20E (mono) [c:\buildslave\mono\build\mono\metadata\marshal.c:7926] mono_marshal_emit_native_wrapper
0x00007FFDFAAADCDD (mono) [c:\buildslave\mono\build\mono\metadata\marshal.c:8290] mono_marshal_get_native_func_wrapper