Airgram

Guides
/
/
Methods

api.setSupergroupUsername()

Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel

Parameters SetSupergroupUsernameParams:

NameTypeDescription
supergroupIdnumber Identifier of the supergroup or channel
usernamestring New value of the username. Use an empty string to remove the username
Returns ApiResponse interface:
interface ApiResponse {
  _: 'setSupergroupUsername' | 'error'
  airgram: Airgram
  request: {
    method: 'setSupergroupUsername'
    params: SetSupergroupUsernameParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}