Skip to content

Commit

Permalink
feat: support username in BaseChat
Browse files Browse the repository at this point in the history
  • Loading branch information
seefs001 committed Nov 4, 2024
1 parent b134871 commit 4cf9c6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/xtelebot_example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func sendGreeting(ctx context.Context, bot *xtelebot.Bot, chatID int64, name str
sendDiceParam := xtelebot.DiceConfig{
Emoji: "🎲",
BaseChat: xtelebot.BaseChat{
ChatID: chatID,
ChatID: fmt.Sprintf("%d", chatID),
},
}

Expand Down
2 changes: 1 addition & 1 deletion xtelebot/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4039,7 +4039,7 @@ func (CloseConfig) params() (Params, error) {
// BaseChat is base type for all chat config types.
type BaseChat struct {
// user_id(int64) or username
ChatID int64 `json:"chat_id"` // required
ChatID string `json:"chat_id"` // required
ChannelUsername string `json:"channel_username,omitempty"` // optional
ProtectContent bool `json:"protect_content,omitempty"` // optional
ReplyToMessageID int `json:"reply_to_message_id,omitempty"` // optional
Expand Down

0 comments on commit 4cf9c6e

Please sign in to comment.