Advertisement
Stillkill

Discord.Net attachment iteration

Apr 8th, 2019
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. //sorry for spacing inconsistencies, i typed on mobile
  2. using System.Linq;
  3.  
  4. Public async Task GetMsgAttachments(SocketMessage msg)
  5. {
  6.     For (int i = 0, i <= msg.Attachments.Count, i++)
  7.     {
  8.      // you can replace FileName with whatever property you need
  9.      Var atch = msg.Attachments.ElementAt(i).FileName
  10.      
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement