| 1 |
// Copyright 2022 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
package a |
| 6 |
|
| 7 |
type Interaction[DataT InteractionDataConstraint] struct { |
| 8 |
} |
| 9 |
|
| 10 |
type InteractionDataConstraint interface { |
| 11 |
[]byte | |
| 12 |
UserCommandInteractionData |
| 13 |
} |
| 14 |
|
| 15 |
type UserCommandInteractionData struct { |
| 16 |
resolvedInteractionWithOptions |
| 17 |
} |
| 18 |
|
| 19 |
type resolvedInteractionWithOptions struct { |
| 20 |
Resolved Resolved `json:"resolved,omitempty"` |
| 21 |
} |
| 22 |
|
| 23 |
type Resolved struct { |
| 24 |
Users ResolvedData[User] `json:"users,omitempty"` |
| 25 |
} |
| 26 |
|
| 27 |
type ResolvedData[T ResolvedDataConstraint] map[uint64]T |
| 28 |
|
| 29 |
type ResolvedDataConstraint interface { |
| 30 |
User | Message |
| 31 |
} |
| 32 |
|
| 33 |
type User struct{} |
| 34 |
|
| 35 |
type Message struct { |
| 36 |
Interaction *Interaction[[]byte] `json:"interaction,omitempty"` |
| 37 |
} |