WaterGenie35 / discord-auto-translate-bot

2 stars 3 forks source link

Add a command to check the current monthly quota #4

Open WaterGenie35 opened 4 years ago

WaterGenie35 commented 4 years ago

Google side: https://cloud.google.com/docs/quota#viewing_your_quota https://cloud.google.com/service-usage https://cloud.google.com/service-usage/docs/libraries#python

Discord side: https://discordpy.readthedocs.io/en/v1.2.3/ext/commands/commands.html

WaterGenie35 commented 4 years ago

Google Cloud Console

  1. Select discord bot project on the Google Cloud Platform
  2. Select the cloud translation api on API & Services
  3. Quotas
  4. v2 and v3 general model characters
  5. per day / per minute
Quota Metric Details
Location: Cloud Translation API
Category: v2 and v3 general model characters per day
Quota Metric: translate.googleapis.com/default

Viewing Quotas

From Google Cloud Documentations:

WaterGenie35 commented 4 years ago

Not service usage api. Lost in monitoring api's abstractions. Couldn't get daily character count as in the api quotas page on the cloud console onto metrics explorer (only showed uptime instead???). Just count locally as it looks like we will have to learn the whole platform infrastructure in hope to query this statistics before even knowing if it's actually possible or not.