1
0
mirror of https://gitlab.com/Deukhoofd/DeukBot4.git synced 2026-04-04 03:30:05 +00:00

Added command for bot opinion

This commit is contained in:
2018-03-30 16:33:42 +02:00
parent 3ac40ba00e
commit b4a8923f9e
3 changed files with 69 additions and 2 deletions

View File

@@ -1,12 +1,20 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
namespace DeukBot4.Utilities
{
public static class IEnumerableExtensions
public static class EnumerableExtensions
{
public static string Join(this IEnumerable<string> arr, string sep)
{
return string.Join(sep, arr);
}
public static T Choice<T>(this IEnumerable<T> arr, Random random)
{
var a = arr.ToArray();
return a[random.Next(0, a.Count())];
}
}
}