fix time
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
				
			|||||||
import time
 | 
					from time import time
 | 
				
			||||||
import discord, asyncio
 | 
					import discord, asyncio
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
from discord.ext import commands
 | 
					from discord.ext import commands
 | 
				
			||||||
@@ -20,13 +20,13 @@ async def load_cogs():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
async def time_to_bereal():
 | 
					async def time_to_bereal():
 | 
				
			||||||
    # Get subscribers
 | 
					    # Get subscribers
 | 
				
			||||||
    time = int(time.time())
 | 
					    t = int(time())
 | 
				
			||||||
    subscribers = app.db.get_subscribers()
 | 
					    subscribers = app.db.get_subscribers()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Send message to all subscribers
 | 
					    # Send message to all subscribers
 | 
				
			||||||
    for subscriber in subscribers:
 | 
					    for subscriber in subscribers:
 | 
				
			||||||
        user = await app.fetch_user(subscriber.user_id)
 | 
					        user = await app.fetch_user(subscriber.user_id)
 | 
				
			||||||
        await user.send(f"# :warning: It's time to BeReal.\nOpen BeReal. to post what you are doing right now.\n<t:{time}:R>")
 | 
					        await user.send(f"# :warning: It's time to BeReal.\nOpen BeReal. to post what you are doing right now.\n<t:{t}:R>")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
app.time_to_bereal = time_to_bereal
 | 
					app.time_to_bereal = time_to_bereal
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user