How to use the eris.Message function in eris

To help you get started, we’ve selected a few eris examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SideProjectGuys / invite-manager-bot / src / framework / services / RabbitMq.ts View on Github external
});
				}

				const channel = new FakeChannel({ id: 'fake', name: 'fake' }, guild, 100);
				this.client.channelGuildMap[channel.id] = guild.id;
				guild.channels.add(channel);

				channel.listener = async data => {
					console.log(data);
					delete this.client.channelGuildMap[channel.id];
					guild.channels.remove(channel);
					await sendResponse({ data });
				};

				const args = content.args ? content.args.join(' ') : '';
				const fakeMsg = new Message(
					{
						id: content.id,
						content: `<@!${this.client.user.id}>${content.sudoCmd} ${args}`,
						channel_id: channel.id,
						author: this.client.users.get(content.authorId),
						embeds: [],
						attachments: [],
						mentions: []
					},
					this.client
				);
				(fakeMsg as any).__sudo = true;
				await this.client.cmds.onMessage(fakeMsg);
				break;

			case ShardCommand.OWNER_DM:
github atlasbot / bot / src / structures / FakeMessage.js View on Github external
get() {
		const message = (new Message({
			channel_id: this.channelID,
			type: this.type,
			timestamp: this.timestamp,
			content: this.content,
			author: this.author,
			mentions: this.mentions,
		}, this.Atlas.client));

		message.lang = this.lang;

		return message;
	}
};