Skip to content

Commit

Permalink
external appsettings.json
Browse files Browse the repository at this point in the history
  • Loading branch information
boogiedk committed Dec 11, 2023
1 parent b1324d9 commit 3052525
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ RUN dotnet publish "SerfBot.fsproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
COPY /home/SerfBot/appsettings.json ./appsettings.json
ENTRYPOINT ["dotnet", "SerfBot.dll"]
1 change: 0 additions & 1 deletion SerfBot/TelegramBot.fs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ let updateArrivedMessage (ctx: UpdateContext) =
match ctx.Update.Message with
| Some { MessageId = messageId; Chat = chat; Text = text; Photo = photo; Caption = caption } ->
let user = ctx.Update.Message.Value.From.Value

let base64Img = if photo.IsSome then handleFiles (Array.last photo.Value).FileId ctx else ""
let message = if text.IsSome then text.Value elif caption.IsSome then caption.Value else ""
match isValidUser user.Id with
Expand Down
8 changes: 3 additions & 5 deletions SerfBot/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"UserIds": [
202224486
],
"TelegramBotToken": "270652017:AAG5O6FvMgMhB9MlOBsIF_yoKXaoiHD1GGs",
"OpenAiApiToken": "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"
"UserIds": [],
"TelegramBotToken": "bot-token",
"OpenAiApiToken": "openai-token"
}

0 comments on commit 3052525

Please sign in to comment.