@@ -22,7 +22,7 @@ def parse_limit(limit):
22
22
23
23
24
24
@Client .on_message (filters .command ("shift" , prefix ) & filters .me )
25
- async def shift (client , message ):
25
+ async def shift (client : Client , message ):
26
26
lol = await edit_or_reply (message , "Processing please wait" )
27
27
x = message .text .split (None , 1 )[1 ]
28
28
x = x .replace (" " , "" )
@@ -49,7 +49,7 @@ async def shift(client, message):
49
49
a = 0
50
50
if limit == "None" or limit == "none" :
51
51
try :
52
- async for message in client .get_chat_history (fromchat ):
52
+ async for message in client .get_chat_history (fromchat , reverse = True ):
53
53
try :
54
54
await message .copy (tochat )
55
55
a = a + 1
@@ -74,7 +74,9 @@ async def shift(client, message):
74
74
lol .edit ("Enter a vailed limit" )
75
75
return
76
76
try :
77
- async for message in client .get_chat_history (fromchat , limit = limit ):
77
+ async for message in client .get_chat_history (
78
+ fromchat , limit = limit , reverse = True
79
+ ):
78
80
try :
79
81
await message .copy (tochat )
80
82
@@ -95,7 +97,7 @@ async def shift(client, message):
95
97
96
98
97
99
@Client .on_message (filters .command ("dmshift" , prefix ) & filters .me )
98
- async def dmshift (client , message ):
100
+ async def dmshift (_ , message ):
99
101
await message .edit ("Processing, please wait..." )
100
102
101
103
command_parts = message .text .split ()
0 commit comments