|
@@ -5,6 +5,7 @@ import {
|
|
getApplicationTerminatedEmbed,
|
|
getApplicationTerminatedEmbed,
|
|
getApplicationWithdrawnEmbed,
|
|
getApplicationWithdrawnEmbed,
|
|
getAppliedOnOpeningEmbed,
|
|
getAppliedOnOpeningEmbed,
|
|
|
|
+ getBeganApplicationReviewEmbed,
|
|
getLeaderSetEmbed,
|
|
getLeaderSetEmbed,
|
|
getLeaderUnsetEmbed,
|
|
getLeaderUnsetEmbed,
|
|
getMintCapacityChangedEmbed,
|
|
getMintCapacityChangedEmbed,
|
|
@@ -34,6 +35,17 @@ export const processBlock = async (api: ApiPromise, client: Discord.Client, bloc
|
|
const channel: Discord.TextChannel = client.channels.cache.get(workingGroups[section]) as Discord.TextChannel;
|
|
const channel: Discord.TextChannel = client.channels.cache.get(workingGroups[section]) as Discord.TextChannel;
|
|
if (channel) {
|
|
if (channel) {
|
|
switch(method) {
|
|
switch(method) {
|
|
|
|
+ case "BeganApplicationReview":
|
|
|
|
+ const beganReviewId = data[0] as OpeningId
|
|
|
|
+ const beganReviewOpeningObject = await getOpening(api, section, hash, beganReviewId);
|
|
|
|
+ const beganReviewHiringOpening = await getHiringOpening(api, hash, beganReviewOpeningObject.hiring_opening_id);
|
|
|
|
+ const applicants = await Promise.all([...beganReviewOpeningObject.applications].map( async(appId: ApplicationId) => {
|
|
|
|
+ const application = await getApplication(api, section, hash, appId);
|
|
|
|
+ return await getMember(api, application.member_id);
|
|
|
|
+ }));
|
|
|
|
+ const beganReviewHiringOpeningText = JSON.parse(beganReviewHiringOpening.human_readable_text.toString());
|
|
|
|
+ channel.send({ embeds: [getBeganApplicationReviewEmbed(beganReviewHiringOpeningText, applicants, blockNumber, value)] });
|
|
|
|
+ break;
|
|
case "ApplicationTerminated":
|
|
case "ApplicationTerminated":
|
|
const id = data[0] as ApplicationId
|
|
const id = data[0] as ApplicationId
|
|
const terminatedApplication = await getApplication(api, section, hash, id);
|
|
const terminatedApplication = await getApplication(api, section, hash, id);
|