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)
- get wss://gateway.discord.gg data HOT 4
- When editing a message, does it support changing the message to be visible only to the current user? HOT 1
- midjourney how to get the error information like 'Invalid request' #1 HOT 1
- Missing Permissions for `GuildMemberTimeout` HOT 2
- Webhook functions return `Role` instead of `Webhook` HOT 1
- How to use Discord's reconnection mechanism?
- MessageComponent button getting invalid response if emoji isn't specified HOT 1
- Occasionally errors will occur when calling discordgo.Session.InteractionRespond HOT 5
- Panics when handling presences HOT 2
- Modal Submission not sending field data HOT 1
- Version is error HOT 1
- User installs seem to not work yet HOT 3
- Custom websocket close handler
- Registering slash commands HOT 2
- My bot is not getting an activity when attempting to use UpdateStatusComplex()
- Updating Files with InteractionRespond will not delete old or existing files
- I can't verify requests for Discord interactions URL properly
- Add "video" for ChannelVoiceJoin
- Update golang.org/x/crypto to v0.22.0 and Minimum Go Version to 1.18 to Address Security Vulnerabilities
- discordgo.User.AvatarURL("512") panics HOT 3
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.