Skip to content

Commit

Permalink
Update autopost.py
Browse files Browse the repository at this point in the history
  • Loading branch information
StarkGang authored Feb 14, 2021
1 parent 5ef3217 commit 439adf4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fridaybot/modules/autopost.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ async def lol(event):
await event.edit("`Only Channels Can Use THis Feature.`")
return
sed = event.pattern_match.group(1)
if not sed.isdigit():
await event.edit("`Channel ID Should be Integers`")
return
if is_post_data_in_db(sed , event.chat_id):
await event.edit("Ah, This Channel Is Already DB")
return
add_new_post_data_in_db(sed, event.chat_id)
await event.edit(f"`Add AutoPosting To This Chat From {sed}`")
await event.edit(f"`Added AutoPosting To This Chat From {sed}`")

@bot.on(admin_cmd(pattern="rmautopost$"))
async def lol(event):
Expand Down

0 comments on commit 439adf4

Please sign in to comment.