osu-api-extended
Version:
Advanced osu! api wrapper for v1 and v2, with extra stuff
41 lines • 1.26 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.description = void 0;
const request_1 = require("../../../../../../utility/request");
const request = (0, request_1.namespace)('https://osu.ppy.sh/api/v2/');
exports.description = {
auth: 0,
title: __filename,
method: 'GET',
description: 'Send message to chat channel',
params: [
{
type: 'number',
name: 'channel_id',
optional: false,
description: 'The channel_id of the channel to send message to',
},
{
type: 'number',
name: 'message',
optional: false,
description: 'Message to send',
},
{
type: 'number',
name: 'is_action',
optional: false,
description: 'Whether the message is an action',
},
],
return: 'response',
};
const name = async (channel_id, message, is_action) => {
const data = await request(`chat/channels/${channel_id}/messages`, {
method: 'POST',
data: JSON.stringify({ message, is_action }),
});
return data;
};
exports.default = name;
//# sourceMappingURL=send.js.map
;