Skip to content

Instantly share code, notes, and snippets.

@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.
@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 / 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 / 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;
const links = [];
const rpLinks = [
<div classname="header applicationsHeader">
Rich Presence
</div>
];
// First way
DocumentationPages.map(link => {
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!');
using Discord;
class Program
{
static void Main(string[] args) => new Program().Start();
public void Start()
{
var client = new DiscordClient();
client.MessageReceived += async (s, e) =>