Creating discourse user group with code

I need to create a discourse user group with my plugin. I used the below code and its not working. Any idea why its not working ? Thankyou

default_group =
        name: 'Dumy',
        visibility_level: Group.visibility_levels[:public],
        primary_group: true,
        title: 'Dumy',
        flair_url: '',
        bio_raw: 'Dumy wording.',
        full_name: 'dummy'

I referred to the code used in patreon plugin

Thank you @riking for fixing the link

Are you seeing any errors in /logs? Can you link to the relevant plugin code if it’s publicly available on GitHub?

1 Like

Hi @techAPJ,
I’m not seeing any errors on my logs. This is the repo of my plugin

I was adding the feature in the branch user-profile-details