bug fixes
buggood first issue
<!--- Please provide a general summary of your changes in the title above -->
## Pull request type
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->
Please check the type of change your PR introduces:
- [X] Bugfix
- [ ] Feature
- [ ] Other (please describe):
## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
### Builders.Button:build()
```luau
builders.message.components.button.new({
style = "Blurple",
label = "hi",
customId = "hello_world"
}):build()
```
would error as `build` tried to index api_types.channel.ButtonStyle (nil) with "Blurple"
### Classes.Interactable:deferAsync()
```luau
bot.onModalInteraction:listen(function(modal)
warn(modal:deferAsync():await())
end)
```
would error as `deferAsync` added an incorrect data field to the request
### WebSocket.Manager:connectAsync()
shardInstance:connectAsync(...):await() would yield and make some emitters not being able to listen() in time
causing bot:connectAsync():await() to infinitely yield as it waits for webSocketManager.onConnected to be invoked
## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by this PR. -->
bug fixes
- `api_types.channel.ButtonStyle` -> `api_types.message.ButtonStyle`
- removed `data = {}` from deferAsync request
- moved `shardInstance:connectAsync` to allow listeners to be set in time
## Other information
currently deferAsync only offers one type (5), would it be possible to see type 6 in the future?
type 5 makes the bot reply to the interaction with "{bot name} is thinking..."
while type 6 just sends an acknowledgement to discord
<!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
合并状态:已合并 合并于 2025-08-30 关闭于 2025-08-30 0 条评论