UNPKG

node-groupme

Version:

The only GroupMe API library that isn't a million years old.

35 lines 1.39 kB
import type { APIGroup } from 'groupme-api-types'; import type { Client, FormerGroup, Member, SendableChannelInterface } from '..'; import { BaseGroup, ChannelType, GroupMessage, GroupMessageManager, PollManager } from '..'; declare type GroupUpdateOptions = { name: string; description: string; image_url: string; share: boolean; office_mode: boolean; }; interface ActiveGroupInterface { fetch(): Promise<Group>; update(options: GroupUpdateOptions): Promise<Group>; transferOwnershipTo(newOwner: string): Promise<Group>; delete(): Promise<void>; changeNickname(nickname: string): Promise<Member>; send(text: string): Promise<GroupMessage>; leave(): Promise<FormerGroup>; } export default class Group extends BaseGroup implements ActiveGroupInterface, SendableChannelInterface { readonly type = ChannelType.Group; readonly messages: GroupMessageManager; readonly polls: PollManager; constructor(client: Client, data: APIGroup); send(text: string): Promise<GroupMessage>; fetch(): Promise<Group>; update(options: GroupUpdateOptions): Promise<Group>; transferOwnershipTo(newOwner: string): Promise<Group>; delete(): Promise<void>; changeNickname(nickname: string): Promise<Member>; leave(): Promise<FormerGroup>; get me(): Member | undefined; } export {}; //# sourceMappingURL=Group.d.ts.map