"use strict";

const Promise = require("bluebird");
const createSession = require("@modular-matrix/create-session");
const sendStickerEvent = require("./");

return Promise.try(() => {
	return createSession("https://pixie.town/", { accessToken: require("../../../private/access-token") });
}).then((session) => {
	return Promise.try(() => {
		return sendStickerEvent(session, {
			roomID: "!TFtSgVEJlHMAhDyHOk:pixie.town",
			description: "Test sticker",
			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);
	});
});
