Skip to content

Instantly share code, notes, and snippets.

@mark-ignacio
Created February 19, 2022 04:58
Show Gist options
  • Save mark-ignacio/086e76d8743bc6f2250380bd83519d77 to your computer and use it in GitHub Desktop.
Save mark-ignacio/086e76d8743bc6f2250380bd83519d77 to your computer and use it in GitHub Desktop.
Gentei v2 - soft launch docs

Gentei v2 Soft Launch documentation

Until I rebuild the Doctave site for the real launch, this sloppy GitHub gist will contain most info. It will be updated periodically during the soft launch period, which should last until mid-March 2022.

Feel free to contact のヮの#6969 or post in #gentei-限定 on the Hololive Creators Club Discord server to get my attention or ask questions not addressed below.


Gentei's batteries-included Discord bot is called gentei-bouncer#9835. It's a fully automated wrapper for managing one or more members-only roles on enrolled Discord servers.

To add the bot to your server, register on https://gentei.tindabox.net and follow the guided process.

Membership management overview

  1. The bot establishes exclusive management of specified Discord roles. Any user who does not pass a membership check will be removed from the role, and any user that passes will be granted the role.
  2. Gentei refreshes memberships daily, starting at around ~1PM GMT-7. You may notice batches of membership changes around that time.

Bot commands

Gentei's slash commands are available at /gentei. Responses are only visible to the sender.

Mostly-public commands

  • /gentei check - ad-hoc checks for YouTube channel memberships that apply to a Discord server.
  • /gentei info - view the server's configuration

Management commands

In general, Gentei will have management commands if it's handy to be able to mention @roles or #channels from the Discord client to prevent issues caused by human error.

SOFT LAUNCH NOTE: The plan is to implement Discord command permissions for management commands towards the tail end of the soft launch, just to keep things tidy. Until then, management commands will be visible to the entire server but will only be usable by the server owner + the bot inviter.

  • /gentei manage map - creates a role mapping between youtube-channel-id and role. The bot will briefly add and remove itself from this role to ensure that it can actually manage membership.
  • /gentei manage unmap - removes the role mapping for youtube-channel-id and/or role.

SOFT LAUNCH NOTE: The commands below will be implemented during the soft launch period.

  • /gentei manage audit - posts role management audit logs to channel. It will send a test message to confirm that it can.
  • /gentei manage audit off - turns off role management audit logs
  • /gentei manage check - perform a membership check now for a specified user.

FAQ

Why are the required Google/YouTube permissions sketchy?

The short, non-technical answer is that the app cannot ask for less permissions. YouTube/Google decided that the API used for Gentei's automatic membership checks must use these permissions. I wish I could ask for less!

In more technical detail: Gentei depends on reading out comment threads on a members-only video, and the associated YouTube Data API endpoint requires a specific OAuth permission scope called https://www.googleapis.com/auth/youtube.force-ssl.

Referencing that scope with Google's table of all of their OAuth scopes, this maps to the "See, edit, and permanently delete your YouTube videos, ratings, comments and captions" message that you'll see.

There's not really anything we can do about that past asking YouTube to reclassify this API endpoint under a separate OAuth scope and hope that it happens. ¯\_(ツ)_/¯

Why doesn't Gentei support membership tenure or tiers?

Membership tenure and level information (e.g. member for 6 months or a "tier 2" member) is not available via the YouTube API from the channel member's end.

It is however available for the "target" YouTube channels as the members.list API call, which is likely how Discord's official YouTube Channel Memberships integration works. Discord however does not use tier or tenure information for role assignment.

Can I use Gentei for free... but for commercial use?

Yes. I'll post in #gentei-announce if that changes, but I don't think it will anytime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment