@@ -1902,8 +1902,10 @@ async def update(self, ctx, *, flag: str = ""):
1902
1902
1903
1903
embed .description = latest .description
1904
1904
for name , value in latest .fields .items ():
1905
+ if value > 200 :
1906
+ value = value [:200 ] + "..."
1907
+
1905
1908
embed .add_field (name = name , value = value )
1906
- # message = commit_data['commit']['message']
1907
1909
html_url = commit_data ["html_url" ]
1908
1910
short_sha = commit_data ["sha" ][:6 ]
1909
1911
embed .add_field (name = "Merge Commit" , value = f"[`{ short_sha } `]({ html_url } )" )
@@ -1926,28 +1928,29 @@ async def update(self, ctx, *, flag: str = ""):
1926
1928
1927
1929
if res != "Already up to date." :
1928
1930
logger .info ("Bot has been updated." )
1929
- if self .bot .hosting_method == HostingMethod .PM2 :
1930
- embed = discord .Embed (
1931
- title = "Bot has been updated" ,
1932
- color = self .bot .main_color ,
1933
- )
1934
- embed .set_footer (
1935
- text = f"Updating Modmail v{ self .bot .version } " f"-> v{ latest .version } "
1936
- )
1937
- await ctx .send (embed = embed )
1938
- else :
1939
- embed = discord .Embed (
1940
- title = "Bot has been updated and is logging out." ,
1941
- description = "If you do not have an auto-restart setup, please manually start the bot." ,
1942
- color = self .bot .main_color ,
1943
- )
1944
- embed .set_footer (
1945
- text = f"Updating Modmail v{ self .bot .version } " f"-> v{ latest .version } "
1931
+
1932
+ embed = discord .Embed (title = "Bot has been updated" , color = self .bot .main_color ,)
1933
+ embed .set_footer (
1934
+ text = f"Updating Modmail v{ self .bot .version } " f"-> v{ latest .version } "
1935
+ )
1936
+ embed .description = latest .description
1937
+ for name , value in latest .fields .items ():
1938
+ if value > 200 :
1939
+ value = value [:200 ] + "..."
1940
+
1941
+ embed .add_field (name = name , value = value )
1942
+
1943
+ if self .bot .hosting_method == HostingMethod .OTHER :
1944
+ embed .description = (
1945
+ "If you do not have an auto-restart setup, please manually start the bot." ,
1946
1946
)
1947
- await ctx .send (embed = embed )
1947
+
1948
+ await ctx .send (embed = embed )
1948
1949
await self .bot .logout ()
1949
1950
else :
1950
- embed = discord .Embed (title = "Already up to date" , description = desc , color = self .bot .main_color ,)
1951
+ embed = discord .Embed (
1952
+ title = "Already up to date" , description = desc , color = self .bot .main_color ,
1953
+ )
1951
1954
await ctx .send (embed = embed )
1952
1955
1953
1956
@commands .command (hidden = True , name = "eval" )
0 commit comments