This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clearMessages = function (guild_id, authToken, deleted = new Set(), interval = 1000) { | |
/* | |
* Discord: Don't copy stuff into this box | |
* Me: dOn'T COpy sTuFf iNtO tHIs bOx | |
*/ | |
const searchURL = `https://discordapp.com/api/v6/guilds/${guild_id}/messages/search?include_nsfw=true` | |
const headers = { Authorization: authToken } | |
let clock = 0 | |
function delay(duration) { | |
return new Promise((resolve, reject) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as hookMod from 'angular2/src/router/lifecycle_annotations'; | |
import * as routerMod from 'angular2/src/router/router'; | |
import {isBlank, isPresent} from 'angular2/src/facade/lang'; | |
import {StringMapWrapper} from 'angular2/src/facade/collection'; | |
import {Promise, PromiseWrapper} from 'angular2/src/facade/async'; | |
import {BaseException} from 'angular2/src/facade/exceptions'; | |
import { | |
ElementRef, DynamicComponentLoader, Directive, Injector, provide, ComponentRef, Attribute | |
} from 'angular2/core'; | |
import { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
from functools import wraps | |
def set_attributes(constructor): | |
@wraps(constructor) | |
def wrapped(self, *args, **kwargs): | |
names = inspect.getargspec(constructor).args | |
for (key, value) in dict(zip(names[1:], args)).items(): | |
setattr(self, key, value) | |
for (key, value) in kwargs.items(): |