Skip to content

v2.chat.channels.messages.send

owo edited this page May 8, 2022 · 3 revisions

Create new PM or send new message

Authentication

const { auth } = require('osu-api-extended');
await auth.login_lazer(username, password);

Function

await v2.chat.channels.messages.send()

Parameters

Parameter Type Description
user_id number id of the user
message number Message to send
is_action number Whether the message is an action

Response

export interface response {
  channel: {
    channel_id: number;
    description: string;
    icon: string;
    moderated: boolean;
    name: string;
    type: string;
    last_message_id: number;
    users: number[];
  };
  message: {
    message_id: number;
    sender_id: number;
    channel_id: number;
    timestamp: string;
    content: string;
    is_action: boolean;
    sender: {
      avatar_url: string;
      country_code: string;
      default_group: string;
      id: number;
      is_active: boolean;
      is_bot: boolean;
      is_deleted: boolean;
      is_online: boolean;
      is_supporter: boolean;
      pm_friends_only: boolean;
      username: string;
    };
  };
  new_channel_id: number;
}

[v3.x.x] Documentation


[v2.x.x] Documentation

Clone this wiki locally