Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gateway.Gateway.Latency() appears to be broken #373

Closed
Serpentiel opened this issue Feb 10, 2023 · 1 comment
Closed

gateway.Gateway.Latency() appears to be broken #373

Serpentiel opened this issue Feb 10, 2023 · 1 comment

Comments

@Serpentiel
Copy link

I'm trying to call gateway.Gateway's Latency() method the following way:

	Handler: func(s *state.State) cmdroute.CommandHandlerFunc {
		return func(ctx context.Context, cmd cmdroute.CommandData) *api.InteractionResponseData {
			return &api.InteractionResponseData{
				Embeds: util.Embeds(
					fmt.Sprintf("🏓 Pong! Bot's latency to Discord is %dms.", s.Gateway().Latency().Milliseconds()),
				),
			}
		}
	},

which results in:

image

might be related to #360

@diamondburned
Copy link
Owner

Closing this since I believe it's fixed on 23140ac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants