Experimental support for Audit Logs (#1403)

* start audit logs

* make better var types so gawdl3y doesn't shit on this

* add constructor stuff

* make more changes

* add entry creation

* add methods

* make it all work hopefully

* aaa

* aaaa

* i wish i could test this locally

* fix users, guild when i feel like it

* make guild prop non-enumerable

* make better types

* change nouns

* e

* Update GuildAuditLogs.js

* Update GuildAuditLogs.js

* Update GuildAuditLogs.js

* eek

* Update GuildAuditLogs.js

* Update GuildAuditLogs.js

* friggin trailing spaces

* Update GuildAuditLogs.js

* docs!

* Update GuildAuditLogs.js

* reason stuff

* Update GuildAuditLogs.js

* Update GuildAuditLogs.js

* support before/after for pagination

* Update Guild.js

* Update GuildAuditLogs.js

* mfw using github web editor

* fix build

* Update Guild.js

* amazing cache fuckery shit evil

* cool stuff

* make building audit logs nicer

* ban endpoint stuff

* dox

* <.<
This commit is contained in:
Gus Caplan
2017-04-29 14:34:57 -05:00
committed by Amish Shah
parent b0a3528411
commit 4127cf6e40
6 changed files with 271 additions and 27 deletions

View File

@@ -132,6 +132,7 @@ const Endpoints = exports.Endpoints = {
webhooks: `${base}/webhooks`,
ack: `${base}/ack`,
settings: `${base}/settings`,
auditLogs: `${base}/audit-logs`,
Emoji: emojiID => Endpoints.CDN(root).Emoji(emojiID),
Icon: (root, hash) => Endpoints.CDN(root).Icon(guildID, hash),
Splash: (root, hash) => Endpoints.CDN(root).Splash(guildID, hash),

View File

@@ -203,6 +203,7 @@ Permissions.FLAGS = {
MANAGE_CHANNELS: 1 << 4,
MANAGE_GUILD: 1 << 5,
ADD_REACTIONS: 1 << 6,
VIEW_AUDIT_LOG: 1 << 7,
READ_MESSAGES: 1 << 10,
SEND_MESSAGES: 1 << 11,