fix embeds and statements
parent
4b1c61f6e4
commit
857ccc2736
|
@ -29,14 +29,7 @@ export default class Root extends Route {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!req.body.subject) {
|
if (!req.body.subject || !req.body.body) {
|
||||||
return res.status(400).json({
|
|
||||||
code: this.constants.codes.CLIENT_ERROR,
|
|
||||||
message: this.constants.messages.CLIENT_ERROR,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!req.body.body) {
|
|
||||||
return res.status(400).json({
|
return res.status(400).json({
|
||||||
code: this.constants.codes.CLIENT_ERROR,
|
code: this.constants.codes.CLIENT_ERROR,
|
||||||
message: this.constants.messages.CLIENT_ERROR,
|
message: this.constants.messages.CLIENT_ERROR,
|
||||||
|
@ -60,7 +53,7 @@ export default class Root extends Route {
|
||||||
embed.setColor('#dd3acd');
|
embed.setColor('#dd3acd');
|
||||||
embed.addField('Subject', req.body.subject);
|
embed.addField('Subject', req.body.subject);
|
||||||
embed.addField('Body', req.body.body);
|
embed.addField('Body', req.body.body);
|
||||||
embed.addField('ID', executiveOrder.oID);
|
embed.setDescription(executiveOrder.oID);
|
||||||
embed.setTimestamp(new Date());
|
embed.setTimestamp(new Date());
|
||||||
|
|
||||||
const channel = <TextChannel>this.server.client.getChannel('807444198969835550');
|
const channel = <TextChannel>this.server.client.getChannel('807444198969835550');
|
||||||
|
@ -90,14 +83,7 @@ export default class Root extends Route {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!req.body.subject) {
|
if (!req.body.subject || !req.body.body) {
|
||||||
return res.status(400).json({
|
|
||||||
code: this.constants.codes.CLIENT_ERROR,
|
|
||||||
message: this.constants.messages.CLIENT_ERROR,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!req.body.body) {
|
|
||||||
return res.status(400).json({
|
return res.status(400).json({
|
||||||
code: this.constants.codes.CLIENT_ERROR,
|
code: this.constants.codes.CLIENT_ERROR,
|
||||||
message: this.constants.messages.CLIENT_ERROR,
|
message: this.constants.messages.CLIENT_ERROR,
|
||||||
|
@ -115,7 +101,7 @@ export default class Root extends Route {
|
||||||
embed.setColor('#66e1ff');
|
embed.setColor('#66e1ff');
|
||||||
embed.addField('Subject', req.body.subject);
|
embed.addField('Subject', req.body.subject);
|
||||||
embed.addField('Body', req.body.body);
|
embed.addField('Body', req.body.body);
|
||||||
embed.addField('ID', motionID);
|
embed.setDescription(motionID);
|
||||||
embed.setTimestamp(new Date());
|
embed.setTimestamp(new Date());
|
||||||
|
|
||||||
const channel = <TextChannel>this.server.client.getChannel('807444198969835550');
|
const channel = <TextChannel>this.server.client.getChannel('807444198969835550');
|
||||||
|
|
Loading…
Reference in New Issue