diff --git a/src/Classes/APIBots/utils.ts b/src/Classes/APIBots/utils.ts index 4ff81f3..eb11406 100644 --- a/src/Classes/APIBots/utils.ts +++ b/src/Classes/APIBots/utils.ts @@ -253,7 +253,7 @@ export function getProjectSlugUrl(slug: string): string { } export function getProjectUrl(contractAddr: string, projectId: string): string { - return `https://www.artblocks.io/collections/${contractAddr}-${projectId}` + return `https://www.artblocks.io/collection/${contractAddr}-${projectId}` } export function buildArtBlocksTokenURL( diff --git a/src/Classes/ArtIndexerBot.ts b/src/Classes/ArtIndexerBot.ts index f2363e7..5221d71 100644 --- a/src/Classes/ArtIndexerBot.ts +++ b/src/Classes/ArtIndexerBot.ts @@ -31,7 +31,6 @@ import { getProjectUrl, getProjectSlugUrl, } from './APIBots/utils' -import { ProjectConfig } from '../ProjectConfig/projectConfig' import { randomColor } from '../Utils/smartBotResponse' dotenv.config() @@ -730,8 +729,6 @@ export class ArtIndexerBot { async checkBirthdays( channels: Collection, - projectConfig: ProjectConfig, - artistChannel: boolean ) { const now = new Date() const [year, month, day] = now.toISOString().split('T')[0].split('-') @@ -744,7 +741,7 @@ export class ArtIndexerBot { projBot.startTime.getFullYear().toString() !== year && !sentMessages[projBot.id] ) { - projBot.sendBirthdayMessage(channels, projectConfig, artistChannel) + projBot.sendBirthdayMessage(channels) sentMessages[projBot.id] = true } }) diff --git a/src/Classes/ProjectBot.ts b/src/Classes/ProjectBot.ts index e4f6e6c..86b55e6 100644 --- a/src/Classes/ProjectBot.ts +++ b/src/Classes/ProjectBot.ts @@ -14,7 +14,6 @@ import { getProjectUrl, getTokenApiUrl, getTokenUrl, - isCoreContract, } from './APIBots/utils' import { ensOrAddress, replaceVideoWithGIF } from './APIBots/utils' @@ -25,7 +24,6 @@ import { getLowestPricedTokenByProject, } from '../Data/queryGraphQL' import { CHANNEL_BLOCK_TALK, discordClient, triviaBot } from '..' -import { ProjectConfig } from '../ProjectConfig/projectConfig' import { ProjectHandlerHelper } from './ProjectHandlerHelper' import { UpcomingProjectDetailFragment } from '../../generated/graphql' import { getDayName, getMonthName, getDayOfMonth } from '../Utils/common' @@ -353,8 +351,6 @@ export class ProjectBot { async sendBirthdayMessage( channels: Collection, - projectConfig: ProjectConfig, - artistChannel: boolean ) { try { console.log('sending birthday message(s) for:', this.projectName) @@ -398,20 +394,9 @@ export class ProjectBot { }) // Send all birthdays to #block-talk - let channel = channels.get(CHANNEL_BLOCK_TALK) as TextChannel + const channel = channels.get(CHANNEL_BLOCK_TALK) as TextChannel channel?.send({ embeds: [embedContent] }) - if ( - artistChannel && - isCoreContract(this.coreContract) && - projectConfig.projectToChannel[this.projectNumber] - ) { - // Send in artist channel if one exists - channel = channels.get( - projectConfig.projectToChannel[this.projectNumber] - ) as TextChannel - channel.send({ embeds: [embedContent] }) - } } catch (err) { console.error( 'Error sending birthday message for:', diff --git a/src/Classes/SchedulerBot.ts b/src/Classes/SchedulerBot.ts index bd9f4eb..5300d57 100644 --- a/src/Classes/SchedulerBot.ts +++ b/src/Classes/SchedulerBot.ts @@ -29,15 +29,8 @@ export class ScheduleBot { { timezone: 'America/Chicago', name: 'Bday' }, () => { console.log('Birthday Time!') - const now = new Date() - const hour = now.toLocaleString('en-US', { - timeZone: 'America/Chicago', - hour: 'numeric', - }) artIndexerBot.checkBirthdays( this.channels, - this.projectConfig, - hour.includes('9') // Only post in artist channels at 9am runtime ) } )