Comments (4)
{"t":"GUILD_BAN_ADD","s":133,"op":0,"d":{"user":{"username":"SomeCoolBot","id":"123487981234723","discriminator":"1234","avatar":null},"guild_id":"81273912873"}}
from discordgo.
{"t":"GUILD_BAN_REMOVE","s":177,"op":0,"d":{"user":{"username":"SomeCoolBot","id":"123487981234723","discriminator":"8292","avatar":null},"guild_id":"81273912873"}}
from discordgo.
I was going to take this, but it looks like it's done.
from discordgo.
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.
from discordgo.
Related Issues (20)
- Anyway to get the "soft banned" gateway msg ?
- Where are the interfaces ? HOT 1
- How to make RateLimit work in multiple process?
- [Question] InteractionDeadline giving me timeouts in my commands response HOT 2
- `ChannelMessageSend` returns HTTP 405 error HOT 1
- Using closures as component callbacks
- How does discord get Midjourney alerts
- Sir, how can I get the data in the MessageEmbed structure?
- Threads disappear after updating the parent message
- Is it ok to use master branch in production env? `MessageSend.StickerIDs` seems missing in newest release(v0.27.1) HOT 4
- How can I be notified when the token is reset after I've connected to the Discord gateway?
- Discord robot gets warning messages HOT 3
- Discord-Bot can't see users message-content
- Discord Error 403 error code: 50001 Missing Access
- Error creating message components without emojis HOT 2
- DiscordGo: Encountering HTTP 400 Bad Request Error for Button Components Without Emojis HOT 1
- Invalid Form Body: BUTTON_COMPONENT_INVALID_EMOJI HOT 2
- Update v0.27.1 -> v0.27.2 HOT 2
- I use InteractionCreate with id only and nothing else
- Can't add SUPPRESS_EMBED flag to other user's message HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discordgo.