Skip to content

Commit

Permalink
bot/modules/nostr: move CommunityEvents import to top
Browse files Browse the repository at this point in the history
  • Loading branch information
webwarrior-ws committed Jan 30, 2025
1 parent d356b5b commit 7bbb3f0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bot/modules/nostr/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
require('websocket-polyfill'); // is it needed?
require('websocket-polyfill');
import { logger } from '../../../logger';
import * as Config from './config';
import { createOrderEvent } from './events';
import * as Commands from './commands';
import { Telegraf } from 'telegraf';
import { MainContext } from '../../start';
import { IOrder } from '../../../models/order';
const CommunityEvents = require('../events/community');

export const configure = (bot: Telegraf<MainContext>) => {
bot.command('/nostr', Commands.info);
Expand All @@ -16,9 +17,6 @@ export const configure = (bot: Telegraf<MainContext>) => {
);
}

// I don't know why these requires are here and not at the top of the file,
// so I leave them as they are instead of converting to imports.
const CommunityEvents = require('../events/community');
CommunityEvents.onCommunityUpdated(async (community: any) => {
// todo: notify users
});
Expand Down

0 comments on commit 7bbb3f0

Please sign in to comment.