Skip to content

Commit

Permalink
chore: fix reply content
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Oct 4, 2024
1 parent 3920e12 commit 0142f9e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/bot/features/commands/private-chat/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ const feature = composer.chatType("private");
feature.command("wallet", logHandle("command-wallet"), chatAction("typing"), async (ctx) => {
const userId = ctx.from?.id;
const walletAddress = ctx.message?.text?.split(" ")[1];
try {

if (!walletAddress || walletAddress.length !== 42) {
await ctx.reply("Please provide a valid wallet address like this: /wallet <WalletAddress>");
return;
}
if (!walletAddress || walletAddress.trim().length !== 42) {
await ctx.reply("Please provide a valid wallet address like this: /wallet 0x...");
return;
}

const user = await ctx.adapters.github.retrieveUserByTelegramId(userId);
if (!user) {
await ctx.reply("You are not registered. Please register first.");
return;
}
const user = await ctx.adapters.github.retrieveUserByTelegramId(userId);
if (!user) {
await ctx.reply("You are not registered. Please register first.");
return;
}

try {
await ctx.adapters.github.handleUserBaseStorage(
{
...user,
Expand Down

0 comments on commit 0142f9e

Please sign in to comment.