Skip to content

Commit

Permalink
Use token instead of chat id...
Browse files Browse the repository at this point in the history
  • Loading branch information
tapnisu committed Jan 28, 2024
1 parent 985453f commit ec57198
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ if (env.TELEGRAM_CHAT_ID)

const client = new Bot(
config,
new SenderBot(
env.TELEGRAM_CHAT_ID.toString(),
channelsToSend,
config.disableLinkPreview
)
new SenderBot(env.TELEGRAM_TOKEN, channelsToSend, config.disableLinkPreview)
);

client.login(env.DISCORD_TOKEN);
4 changes: 2 additions & 2 deletions src/senderBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ export class SenderBot<C extends Context = Context> extends Bot<C> {

constructor(
token: string,
channelsToSend: ChannelId[],
chatsToSend: ChannelId[],
disableLinkPreview: boolean,
config?: BotConfig<C>
) {
super(token, config);

this.chatsToSend = channelsToSend;
this.chatsToSend = chatsToSend;
this.disableLinkPreview = disableLinkPreview;

this.api.config.use(autoRetry());
Expand Down

0 comments on commit ec57198

Please sign in to comment.