Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for events GUILD_BAN_ADD and GUILD_BAN_REMOVE #24

Closed
bwmarrin opened this issue Dec 17, 2015 · 4 comments
Closed

Add support for events GUILD_BAN_ADD and GUILD_BAN_REMOVE #24

bwmarrin opened this issue Dec 17, 2015 · 4 comments
Milestone

Comments

@bwmarrin
Copy link
Owner

No description provided.

@bwmarrin
Copy link
Owner Author

{"t":"GUILD_BAN_ADD","s":133,"op":0,"d":{"user":{"username":"SomeCoolBot","id":"123487981234723","discriminator":"1234","avatar":null},"guild_id":"81273912873"}}

@bwmarrin
Copy link
Owner Author

{"t":"GUILD_BAN_REMOVE","s":177,"op":0,"d":{"user":{"username":"SomeCoolBot","id":"123487981234723","discriminator":"8292","avatar":null},"guild_id":"81273912873"}}

@bwmarrin bwmarrin added this to the v0.8.0 milestone Dec 23, 2015
@iopred
Copy link
Collaborator

iopred commented Dec 31, 2015

I was going to take this, but it looks like it's done.

@bwmarrin
Copy link
Owner Author

It's not done :) These are the websocket events that get fired when someone is banned/unbanned. The code that does the actual ban/unban is in restapi.go but this is for an addition to the wsapi.go file in the event func. So just a new similar block of code as the rest and then adding a user callback func variable to the structs.go Session struct. Looks like they can share a struct so just make one that works for both should do the job when sending the data to the (if defined) user callback func.

Also, btw - Thanks a lot for all the help. I owe you a few beers at this point.

bwmarrin added a commit that referenced this issue Jan 1, 2016
Implement GuildBanAdd/Remove events, closes #24.  Refactor websock event func to remove some redundant code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants