Justoverclock the only special group is "admin" (and also guest/members kind of). Every other group is just a name without meaning for the software. The default moderator group that comes with Flarum is a generic group with a set of pre-defined permissions that can be modified.
The best solution is to always work with permission names. Create a new permission for your feature, and use $user->hasPermission()
or $user->can()
with the permission name. Let extension users assign this permission to the groups they use for moderation.
If you have many permissions and want to "improve" the user experience for new extension users, you might be able to create a database migration that looks at the groups and permissions table, and if the default moderator group exists and has not been renamed, create entries in the group_permission
table to assign those permissions by default.