You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
850 B
JavaScript

"use strict";
const Promise = require("bluebird");
const createSession = require("@modular-matrix/create-session");
const sendImageEvent = require("./");
return Promise.try(() => {
return createSession("https://pixie.town/", { accessToken: require("../../../private/access-token") });
}).then((session) => {
return Promise.try(() => {
return sendImageEvent(session, {
roomID: "!TFtSgVEJlHMAhDyHOk:pixie.town",
description: "potato.jpg",
image: {
url: "mxc://pixie.town/ZgoXjZXGehIIVhoyrlwOyEnH",
displayWidth: 400,
displayHeight: 300,
mimetype: "image/jpeg",
filesize: 113924
},
thumbnail: {
url: "mxc://pixie.town/ZgoXjZXGehIIVhoyrlwOyEnH",
displayWidth: 400,
displayHeight: 300,
mimetype: "image/jpeg",
filesize: 113924
},
});
}).then((result) => {
console.log(result);
});
});