mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	await usings and minor cleanup
This commit is contained in:
		@@ -41,7 +41,7 @@ public static class IUserExtensions
 | 
			
		||||
 | 
			
		||||
    public static async Task<IUserMessage> SendFileAsync(this IUser user, string filePath, string caption = null, string text = null, bool isTTS = false)
 | 
			
		||||
    {
 | 
			
		||||
        using (var file = File.Open(filePath, FileMode.Open))
 | 
			
		||||
        await using (var file = File.Open(filePath, FileMode.Open))
 | 
			
		||||
        {
 | 
			
		||||
            return await (await user.GetOrCreateDMChannelAsync().ConfigureAwait(false)).SendFileAsync(file, caption ?? "x", text, isTTS).ConfigureAwait(false);
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user